| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Servant.Auth.Swagger
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 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 Methods securityName :: Proxy JWT -> Text Source # securityScheme :: Proxy JWT -> SecurityScheme Source # | |
Basic Auth.
Instances
| HasSecurity BasicAuth Source # | |
Defined in Servant.Auth.Swagger Methods 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 #
Instances
| HasSecurity BasicAuth Source # | |
Defined in Servant.Auth.Swagger Methods securityName :: Proxy BasicAuth -> Text Source # securityScheme :: Proxy BasicAuth -> SecurityScheme Source # | |
| HasSecurity JWT Source # | |
Defined in Servant.Auth.Swagger Methods securityName :: Proxy JWT -> Text Source # securityScheme :: Proxy JWT -> SecurityScheme Source # | |