Maintainer | krdlab@gmail.com |
---|---|
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
- data OIDC
- newOIDC :: CPRG g => IORef g -> OIDC
- newOIDC' :: OIDC
- setProvider :: Provider -> OIDC -> OIDC
- setCredentials :: ByteString -> ByteString -> ByteString -> OIDC -> OIDC
- getAuthenticationRequestUrl :: (MonadThrow m, MonadCatch m) => OIDC -> Scope -> Maybe State -> Parameters -> m URI
- requestTokens :: OIDC -> Code -> Manager -> IO Tokens
- data Provider
- type Scope = [ScopeValue]
- data ScopeValue
- type Code = ByteString
- type State = ByteString
- type Parameters = [(ByteString, Maybe ByteString)]
- data Tokens = Tokens {}
- data IdToken = IdToken {
- claims :: IdTokenClaims
- jwt :: Jwt
- data IdTokenClaims = IdTokenClaims {}
- data OpenIdException
- module Jose.Jwt
Client Obtains ID Token and Access Token
newOIDC :: CPRG g => IORef g -> OIDC Source
Create OIDC.
First argument is used in a token decoding on ID Token Validation.
:: ByteString | client ID |
-> ByteString | client secret |
-> ByteString | redirect URI |
-> OIDC | |
-> OIDC |
getAuthenticationRequestUrl :: (MonadThrow m, MonadCatch m) => OIDC -> Scope -> Maybe State -> Parameters -> m URI Source
requestTokens :: OIDC -> Code -> Manager -> IO Tokens Source
Request and obtain valid tokens.
This function requests ID Token and Access Token to a OP's token endpoint, and validates the received ID Token. Returned value is a valid tokens.
Types
type Scope = [ScopeValue] Source
data ScopeValue Source
type Code = ByteString Source
type State = ByteString Source
type Parameters = [(ByteString, Maybe ByteString)] Source
data IdTokenClaims Source
Exception
data OpenIdException Source
Re-exports
module Jose.Jwt