Safe Haskell | None |
---|---|
Language | Haskell2010 |
Network.OAuth2.Experiment.Flows.TokenRequest
Synopsis
- class HasTokenRequestClientAuthenticationMethod a where
- data NoNeedExchangeToken = NoNeedExchangeToken
- class (HasOAuth2Key a, HasTokenRequestClientAuthenticationMethod a) => HasTokenRequest a where
- data TokenRequest a
- type ExchangeTokenInfo a
- mkTokenRequestParam :: a -> ExchangeTokenInfo a -> TokenRequest a
- conduitTokenRequest :: forall {k} a (m :: Type -> Type) (i :: k). (HasTokenRequest a, ToQueryParam (TokenRequest a), MonadIO m) => IdpApplication i a -> Manager -> ExchangeTokenInfo a -> ExceptT TokenResponseError m OAuth2Token
- conduitPkceTokenRequest :: forall {k} a (m :: Type -> Type) (i :: k). (HasTokenRequest a, ToQueryParam (TokenRequest a), MonadIO m) => IdpApplication i a -> Manager -> (ExchangeTokenInfo a, CodeVerifier) -> ExceptT TokenResponseError m OAuth2Token
- conduitTokenRequestInternal :: forall {k} a (m :: Type -> Type) (i :: k). (HasTokenRequest a, ToQueryParam (TokenRequest a), MonadIO m) => IdpApplication i a -> Manager -> (ExchangeTokenInfo a, Maybe CodeVerifier) -> ExceptT TokenResponseError m OAuth2Token
- doTokenRequestInternal :: forall (m :: Type -> Type) a. (MonadIO m, FromJSON a) => ClientAuthenticationMethod -> Manager -> OAuth2 -> URI -> PostBody -> ExceptT TokenResponseError m a
Documentation
class HasTokenRequestClientAuthenticationMethod a where Source #
Methods
getClientAuthenticationMethod :: a -> ClientAuthenticationMethod Source #
Instances
data NoNeedExchangeToken Source #
Only Authorization Code Grant involves a Exchange Token (Authorization Code). ResourceOwnerPassword and Client Credentials make token request directly.
Constructors
NoNeedExchangeToken |
class (HasOAuth2Key a, HasTokenRequestClientAuthenticationMethod a) => HasTokenRequest a where Source #
Methods
mkTokenRequestParam :: a -> ExchangeTokenInfo a -> TokenRequest a Source #
Only 'AuthorizationCode flow (but not resource owner password nor client credentials) will use ExchangeToken
in the token request
create type family to be explicit on it.
with 'type instance WithExchangeToken a b = b' implies no exchange token
v.s. 'type instance WithExchangeToken a b = ExchangeToken -> b' implies needing an exchange token
type WithExchangeToken a b
Instances
conduitTokenRequest :: forall {k} a (m :: Type -> Type) (i :: k). (HasTokenRequest a, ToQueryParam (TokenRequest a), MonadIO m) => IdpApplication i a -> Manager -> ExchangeTokenInfo a -> ExceptT TokenResponseError m OAuth2Token Source #
conduitPkceTokenRequest :: forall {k} a (m :: Type -> Type) (i :: k). (HasTokenRequest a, ToQueryParam (TokenRequest a), MonadIO m) => IdpApplication i a -> Manager -> (ExchangeTokenInfo a, CodeVerifier) -> ExceptT TokenResponseError m OAuth2Token Source #
conduitTokenRequestInternal :: forall {k} a (m :: Type -> Type) (i :: k). (HasTokenRequest a, ToQueryParam (TokenRequest a), MonadIO m) => IdpApplication i a -> Manager -> (ExchangeTokenInfo a, Maybe CodeVerifier) -> ExceptT TokenResponseError m OAuth2Token Source #