Safe Haskell | None |
---|---|
Language | Haskell2010 |
Servant.Auth.Client
Documentation
A simple bearer token.
Constructors
Token | |
Fields |
Instances
IsString Token Source # | |||||
Defined in Servant.Auth.Client.Internal Methods fromString :: String -> Token # | |||||
Generic Token Source # | |||||
Defined in Servant.Auth.Client.Internal Associated Types
| |||||
Read Token Source # | |||||
Show Token Source # | |||||
Eq Token Source # | |||||
type Rep Token Source # | |||||
Defined in Servant.Auth.Client.Internal type Rep Token = D1 ('MetaData "Token" "Servant.Auth.Client.Internal" "servant-auth-client-0.4.2.0-BK3ii5JivqeGpPYcg28e87" 'True) (C1 ('MetaCons "Token" 'PrefixI 'True) (S1 ('MetaSel ('Just "getToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))) |
A Bearer token in the Authorization header:
Authorization: Bearer token
This can be any token recognized by the server, for example, a JSON Web Token (JWT).
Note that, since the exact way the token is validated is not specified,
this combinator can only be used in the client. The server would not know
how to validate it, while the client does not care.
If you want to implement Bearer authentication in your server, you have to
choose a specific combinator, such as JWT
.