Safe Haskell | None |
---|---|
Language | Haskell98 |
Documentation
data AuthManager u e b Source #
IAuthBackend u i e b => AuthManager | |
|
AuthUser | |
|
data AuthFailure e Source #
Show e => Show (AuthFailure e) Source # | |
data LoginFailure Source #
data CreateFailure Source #
data PasswordFailure Source #
class (UserData u, Binary i, Show e, Eq e) => IAuthBackend u i e b | u -> b, b -> e, e -> i where Source #
preparePasswordCreate, cancelPrepare, create, attachLoginMethod, login, logout, recover, getUserId, isDuplicateError
preparePasswordCreate :: Maybe u -> Text -> Handler b (AuthManager u e b) (Either e i) Source #
cancelPrepare :: i -> Handler b (AuthManager u e b) () Source #
create :: Text -> i -> Handler b (AuthManager u e b) (Either (Either e CreateFailure) u) Source #
attachLoginMethod :: u -> i -> Handler b (AuthManager u e b) (Either e ()) Source #
login :: Text -> Text -> Handler b (AuthManager u e b) (Either e (Maybe u)) Source #
logout :: Text -> Handler b (AuthManager u e b) () Source #
recover :: Text -> Handler b (AuthManager u e b) (Either (AuthFailure e) u) Source #
getUserId :: u -> Handler b (AuthManager u e b) ByteString Source #
isDuplicateError :: e -> Handler b (AuthManager u e b) Bool Source #
defAuthSettings :: AuthSettings Source #
authSetCookie :: Lens' AuthSettings (ByteString -> Cookie) Source #
createAccount :: IAuthBackend u i e b => Handler b (AuthManager u e b) (Either (Either e CreateFailure) u) Source #
loginUser :: IAuthBackend u i e b => Handler b (AuthManager u e b) () -> Handler b (AuthManager u e b) () -> Handler b (AuthManager u e b) () Source #
logoutUser :: IAuthBackend u i e b => Handler b (AuthManager u e b) () Source #
recoverSession :: IAuthBackend u i e b => Handler b (AuthManager u e b) () Source #
combinedLoginRecover :: IAuthBackend u i e b => Handler b (AuthManager u e b) () -> Handler b (AuthManager u e b) (Maybe u) Source #
currentUser :: UserData u => Handler b (AuthManager u e b) (Maybe u) Source #
getAuthFailData :: Handler b (AuthManager u e b) (Maybe (AuthFailure e)) Source #
resetAuthFailData :: Handler b (AuthManager u e b) () Source #
authInit :: IAuthBackend u i e b => Maybe (OAuth2Settings u i e b) -> AuthSettings -> SnapletInit b (AuthManager u e b) Source #
isSessionDefined :: Handler b (AuthManager u e b) Bool Source #
isLoggedIn :: UserData u => Handler b (AuthManager u e b) Bool Source #
compiledAuthSplices :: UserData u => SnapletLens b (AuthManager u e b) -> Splices (SnapletCSplice b) Source #
ifLoggedIn :: UserData u => SnapletLens b (AuthManager u e b) -> SnapletISplice b Source #
ifLoggedOut :: UserData u => SnapletLens b (AuthManager u e b) -> SnapletISplice b Source #
loggedInUser :: UserData u => SnapletLens b (AuthManager u e b) -> SnapletISplice b Source #