Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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 :: (HasTokenRequest a, ToQueryParam (TokenRequest a), MonadIO m) => IdpApplication i a -> Manager -> ExchangeTokenInfo a -> ExceptT TokenResponseError m OAuth2Token
- conduitPkceTokenRequest :: (HasTokenRequest a, ToQueryParam (TokenRequest a), MonadIO m) => IdpApplication i a -> Manager -> (ExchangeTokenInfo a, CodeVerifier) -> ExceptT TokenResponseError m OAuth2Token
Documentation
class HasTokenRequestClientAuthenticationMethod a where Source #
Instances
data NoNeedExchangeToken Source #
Only Authorization Code Grant involves a Exchange Token (Authorization Code). ResourceOwnerPassword and Client Credentials make token request directly.
class (HasOAuth2Key a, HasTokenRequestClientAuthenticationMethod a) => HasTokenRequest a where Source #
data TokenRequest a Source #
type ExchangeTokenInfo a Source #
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 :: (HasTokenRequest a, ToQueryParam (TokenRequest a), MonadIO m) => IdpApplication i a -> Manager -> ExchangeTokenInfo a -> ExceptT TokenResponseError m OAuth2Token Source #
Make Token Request https://www.rfc-editor.org/rfc/rfc6749#section-4.1.3
conduitPkceTokenRequest :: (HasTokenRequest a, ToQueryParam (TokenRequest a), MonadIO m) => IdpApplication i a -> Manager -> (ExchangeTokenInfo a, CodeVerifier) -> ExceptT TokenResponseError m OAuth2Token Source #
Make Token Request (PKCE) https://datatracker.ietf.org/doc/html/rfc7636#section-4.5