servant-auth-0.4.1.0: Authentication combinators for servant
Safe HaskellNone
LanguageHaskell2010

Servant.Auth

Synopsis

Authentication

data Auth (auths :: [*]) val Source #

Auth [auth1, auth2] val :> api represents an API protected *either* by auth1 or auth2

Instances

Instances details
HasLink sub => HasLink (Auth tag value :> sub :: Type) Source #

A HasLink instance for Auth

Instance details

Defined in Servant.Auth

Associated Types

type MkLink (Auth tag value :> sub) a #

Methods

toLink :: (Link -> a) -> Proxy (Auth tag value :> sub) -> Link -> MkLink (Auth tag value :> sub) a #

type MkLink (Auth tag value :> sub :: Type) a Source # 
Instance details

Defined in Servant.Auth

type MkLink (Auth tag value :> sub :: Type) a = MkLink sub a

Combinators

data JWT Source #

A JSON Web Token (JWT) in the the Authorization header:

Authorization: Bearer <token>

Note that while the token is signed, it is not encrypted. Therefore do not keep in it any information you would not like the client to know.

JWTs are described in IETF's RFC 7519

data Cookie Source #

A cookie. The content cookie itself is a JWT. Another cookie is also used, the contents of which are expected to be send back to the server in a header, for XSRF protection.

data BasicAuth Source #

Basic Auth.

data FormLogin form Source #

Login via a form.