| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Data.Swagger.Build.Authorisation
Synopsis
- basic :: Authorisation
- apiKey :: PassMethod -> Text -> Authorisation
- data PassMethod
- oauth2 :: GrantTypes -> OAuth2Builder -> Authorisation
- scope :: Text -> ScopeBuilder -> OAuth2Builder
- implicit :: Text -> ImplicitBuilder -> GrantTypes
- authCode :: TokenRequestEndpoint -> TokenEndpoint -> GrantTypes
- tokenEndpoint :: Text -> TokenEndpointBuilder -> TokenEndpoint
- tokenRequestEndpoint :: Text -> TokenReqEndpointBuilder -> TokenRequestEndpoint
- clientIdName :: Text -> TokenReqEndpointBuilder
- clientSecretName :: Text -> TokenReqEndpointBuilder
- token :: Text -> State (TokenName a) ()
- end :: Monad m => m ()
- type OAuth2Builder = State [Scope] ()
- type ScopeSt = Common '["description"] Scope
- type ScopeBuilder = State ScopeSt ()
- type ImplicitBuilder = State (TokenName ImplicitGrant) ()
- type TokenEndpointBuilder = State (TokenName TokenEndpoint) ()
- type TokenReqEndpointBuilder = State TokenRequestEndpoint ()
basic auth
basic :: Authorisation #
api key
apiKey :: PassMethod -> Text -> Authorisation #
data PassMethod #
Constructors
| PassAsHeader | |
| PassAsQuery |
Instances
| Eq PassMethod # | |
Defined in Data.Swagger.Model.Authorisation | |
| Show PassMethod # | |
Defined in Data.Swagger.Model.Authorisation Methods showsPrec :: Int -> PassMethod -> ShowS # show :: PassMethod -> String # showList :: [PassMethod] -> ShowS # | |
| ToJSON PassMethod # | |
Defined in Data.Swagger.Model.Authorisation Methods toJSON :: PassMethod -> Value # toEncoding :: PassMethod -> Encoding # toJSONList :: [PassMethod] -> Value # toEncodingList :: [PassMethod] -> Encoding # | |
oauth2
oauth2 :: GrantTypes -> OAuth2Builder -> Authorisation #
scope :: Text -> ScopeBuilder -> OAuth2Builder #
Add one scope with the given name to an OAuth2 object.
implicit :: Text -> ImplicitBuilder -> GrantTypes #
Construct an implicit grant type with the given login endpoint and some optional token name.
authCode :: TokenRequestEndpoint -> TokenEndpoint -> GrantTypes #
Construct an authentorisation code based grant type object.
tokenEndpoint :: Text -> TokenEndpointBuilder -> TokenEndpoint #
If cases where no build steps are provided but a builder is required
end can be used, e.g. defineModel "Foo" end
builder types
type OAuth2Builder = State [Scope] () #
type ScopeBuilder = State ScopeSt () #
type ImplicitBuilder = State (TokenName ImplicitGrant) () #
type TokenEndpointBuilder = State (TokenName TokenEndpoint) () #
type TokenReqEndpointBuilder = State TokenRequestEndpoint () #