servant-auth-swagger-0.2.10.1: servant-swagger/servant-auth compatibility

Safe HaskellNone
LanguageHaskell2010

Servant.Auth.Swagger

Contents

Synopsis

Documentation

The purpose of this package is provide the instance for 'servant-auth' combinators needed for 'servant-swagger' documentation generation.

Currently only JWT and BasicAuth are supported.

Re-export

data JWT #

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 Auth (auths :: [Type]) val #

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

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

A HasLink instance for Auth

Instance details

Defined in Servant.Auth

Associated Types

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

Methods

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

(AllHasSecurity xs, HasSwagger api) => HasSwagger (Auth xs r :> api :: Type) Source # 
Instance details

Defined in Servant.Auth.Swagger

Methods

toSwagger :: Proxy (Auth xs r :> api) -> Swagger #

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

Defined in Servant.Auth

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

Needed to define instances of HasSwagger

Orphan instances

(AllHasSecurity xs, HasSwagger api) => HasSwagger (Auth xs r :> api :: Type) Source # 
Instance details

Methods

toSwagger :: Proxy (Auth xs r :> api) -> Swagger #