HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Moduleservant-auth-client-0.4.2.0Haskell2010

Servant.Auth.Client

  • 2 types
newtypenewtype Token
#

A simple bearer token.

Constructors

Instances6Eq, Read, Show, IsString, Generic, Rep
datadata Bearer
#

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.