Safe Haskell | None |
---|
Synopsis
- class AuthenticationMethod (a :: k) where
- authenticate :: IO ()
- data NoAuth
- data BasicAuth (userEnv :: Symbol) (passEnv :: Symbol)
- data BasicAuthStatic (user :: Symbol) (pass :: Symbol)
Documentation
class AuthenticationMethod (a :: k) where Source #
Defines one method, authenticate
, called before every action. Use to authenticate user.
Three implementations are provided:
- NoAuth
: No authentication
- BasicAuth
: HTTP Basic Auth using environment variables
- BasicAuthStatic
: HTTP Basic Auth using static values
Define your own implementation to use custom authentication for production.
authenticate :: IO () Source #
Instances
AuthenticationMethod NoAuth Source # | |
Defined in IHP.Job.Dashboard.Auth authenticate :: IO () Source # | |
(KnownSymbol userEnv, KnownSymbol passEnv) => AuthenticationMethod (BasicAuth userEnv passEnv :: Type) Source # | |
Defined in IHP.Job.Dashboard.Auth authenticate :: IO () Source # | |
(KnownSymbol user, KnownSymbol pass) => AuthenticationMethod (BasicAuthStatic user pass :: Type) Source # | |
Defined in IHP.Job.Dashboard.Auth authenticate :: IO () Source # |
Don't use any authentication for jobs.
Instances
AuthenticationMethod NoAuth Source # | |
Defined in IHP.Job.Dashboard.Auth authenticate :: IO () Source # |
data BasicAuth (userEnv :: Symbol) (passEnv :: Symbol) Source #
Authenticate using HTTP Basic Authentication by looking up username/password values in environment variables given as type-level strings.
Instances
(KnownSymbol userEnv, KnownSymbol passEnv) => AuthenticationMethod (BasicAuth userEnv passEnv :: Type) Source # | |
Defined in IHP.Job.Dashboard.Auth authenticate :: IO () Source # |
data BasicAuthStatic (user :: Symbol) (pass :: Symbol) Source #
Authenticate using HTTP Basic Authentication using username/password given as type level strings. Meant for development only!
Instances
(KnownSymbol user, KnownSymbol pass) => AuthenticationMethod (BasicAuthStatic user pass :: Type) Source # | |
Defined in IHP.Job.Dashboard.Auth authenticate :: IO () Source # |