Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data JWT
- data BasicAuth
- data Auth (auths :: [Type]) val
- class HasSecurity x where
- securityName :: Proxy x -> Text
- securityScheme :: Proxy x -> SecurityScheme
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
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
Instances
HasSecurity JWT Source # | |
Defined in Servant.Auth.Swagger securityName :: Proxy JWT -> Text Source # securityScheme :: Proxy JWT -> SecurityScheme Source # |
Basic Auth.
Instances
HasSecurity BasicAuth Source # | |
Defined in Servant.Auth.Swagger securityName :: Proxy BasicAuth -> Text Source # securityScheme :: Proxy BasicAuth -> SecurityScheme Source # |
data Auth (auths :: [Type]) val #
Auth [auth1, auth2] val :> api
represents an API protected *either* by
auth1
or auth2
Needed to define instances of HasSwagger
class HasSecurity x where Source #
securityName :: Proxy x -> Text Source #
securityScheme :: Proxy x -> SecurityScheme Source #
Instances
HasSecurity JWT Source # | |
Defined in Servant.Auth.Swagger securityName :: Proxy JWT -> Text Source # securityScheme :: Proxy JWT -> SecurityScheme Source # | |
HasSecurity BasicAuth Source # | |
Defined in Servant.Auth.Swagger securityName :: Proxy BasicAuth -> Text Source # securityScheme :: Proxy BasicAuth -> SecurityScheme Source # |