-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | OpenID Connect 1.0 library for RP -- -- This package supports implementing of an OpenID Connect 1.0 Relying -- Party. -- -- Examples: -- https://github.com/krdlab/haskell-oidc-client/tree/master/examples @package oidc-client @version 0.2.0.0 module Web.OIDC.Client.Types data ScopeValue OpenId :: ScopeValue Profile :: ScopeValue Email :: ScopeValue Address :: ScopeValue Phone :: ScopeValue OfflineAccess :: ScopeValue type Scope = [ScopeValue] type State = ByteString type Parameters = [(ByteString, Maybe ByteString)] type Code = ByteString type IssuerLocation = Text data OpenIdException DiscoveryException :: Text -> OpenIdException InternalHttpException :: HttpException -> OpenIdException JwtExceptoin :: JwtError -> OpenIdException ValidationException :: Text -> OpenIdException instance GHC.Show.Show Web.OIDC.Client.Types.OpenIdException instance GHC.Classes.Eq Web.OIDC.Client.Types.ScopeValue instance GHC.Show.Show Web.OIDC.Client.Types.ScopeValue instance GHC.Read.Read Web.OIDC.Client.Types.ScopeValue instance Data.Aeson.Types.Class.FromJSON Web.OIDC.Client.Types.ScopeValue instance GHC.Exception.Exception Web.OIDC.Client.Types.OpenIdException module Web.OIDC.Client.Discovery.Provider -- | An OpenID Provider information data Provider Provider :: Configuration -> [Jwk] -> Provider [configuration] :: Provider -> Configuration [jwkSet] :: Provider -> [Jwk] -- | An OpenID Provider Configuration data Configuration Configuration :: IssuerLocation -> Text -> Text -> Text -> Text -> Text -> [Text] -> [Text] -> [Text] -> [ScopeValue] -> [Text] -> [Text] -> Configuration [issuer] :: Configuration -> IssuerLocation [authorizationEndpoint] :: Configuration -> Text [tokenEndpoint] :: Configuration -> Text [userinfoEndpoint] :: Configuration -> Text [revocationEndpoint] :: Configuration -> Text [jwksUri] :: Configuration -> Text [responseTypesSupported] :: Configuration -> [Text] [subjectTypesSupported] :: Configuration -> [Text] [idTokenSigningAlgValuesSupported] :: Configuration -> [Text] [scopesSupported] :: Configuration -> [ScopeValue] [tokenEndpointAuthMethodsSupported] :: Configuration -> [Text] [claimsSupported] :: Configuration -> [Text] instance GHC.Classes.Eq Web.OIDC.Client.Discovery.Provider.Configuration instance GHC.Show.Show Web.OIDC.Client.Discovery.Provider.Configuration instance Data.Aeson.Types.Class.FromJSON Web.OIDC.Client.Discovery.Provider.Configuration module Web.OIDC.Client.Settings -- | This data type represents information needed in the OpenID flow. data OIDC OIDC :: Text -> Text -> ByteString -> ByteString -> ByteString -> Provider -> OIDC [oidcAuthorizationSeverUrl] :: OIDC -> Text [oidcTokenEndpoint] :: OIDC -> Text [oidcClientId] :: OIDC -> ByteString [oidcClientSecret] :: OIDC -> ByteString [oidcRedirectUri] :: OIDC -> ByteString [oidcProvider] :: OIDC -> Provider def :: OIDC newOIDC :: Provider -> OIDC setCredentials :: ByteString -> ByteString -> ByteString -> OIDC -> OIDC module Web.OIDC.Client.Discovery.Issuers google :: IssuerLocation module Web.OIDC.Client.Tokens data Tokens Tokens :: Text -> Text -> IdToken -> Maybe Integer -> Maybe Text -> Tokens [accessToken] :: Tokens -> Text [tokenType] :: Tokens -> Text [idToken] :: Tokens -> IdToken [expiresIn] :: Tokens -> Maybe Integer [refreshToken] :: Tokens -> Maybe Text data IdToken IdToken :: IdTokenClaims -> Jwt -> IdToken [claims] :: IdToken -> IdTokenClaims [jwt] :: IdToken -> Jwt data IdTokenClaims IdTokenClaims :: Text -> Text -> [Text] -> IntDate -> IntDate -> IdTokenClaims [iss] :: IdTokenClaims -> Text [sub] :: IdTokenClaims -> Text [aud] :: IdTokenClaims -> [Text] [exp] :: IdTokenClaims -> IntDate [iat] :: IdTokenClaims -> IntDate instance GHC.Classes.Eq Web.OIDC.Client.Tokens.Tokens instance GHC.Show.Show Web.OIDC.Client.Tokens.Tokens instance GHC.Classes.Eq Web.OIDC.Client.Tokens.IdToken instance GHC.Show.Show Web.OIDC.Client.Tokens.IdToken instance GHC.Classes.Eq Web.OIDC.Client.Tokens.IdTokenClaims instance GHC.Show.Show Web.OIDC.Client.Tokens.IdTokenClaims module Web.OIDC.Client.CodeFlow -- | Make URL for Authorization Request. getAuthenticationRequestUrl :: (MonadThrow m, MonadCatch m) => OIDC -> Scope -> Maybe State -> Parameters -> m URI -- | Request and validate tokens. -- -- This function requests ID Token and Access Token to a OP's token -- endpoint, and validates the received ID Token. Returned Tokens -- value is a valid. -- -- If a HTTP error has occurred or a tokens validation has failed, this -- function throws OpenIdException. requestTokens :: OIDC -> Code -> Manager -> IO Tokens validateClaims :: Text -> Text -> IntDate -> JwtClaims -> IO () getCurrentIntDate :: IO IntDate module Web.OIDC.Client.Discovery -- | This function obtains OpenID Provider configuration and JWK set. discover :: IssuerLocation -> Manager -> IO Provider google :: IssuerLocation -- | An OpenID Provider information data Provider Provider :: Configuration -> [Jwk] -> Provider [configuration] :: Provider -> Configuration [jwkSet] :: Provider -> [Jwk] -- | An OpenID Provider Configuration data Configuration Configuration :: IssuerLocation -> Text -> Text -> Text -> Text -> Text -> [Text] -> [Text] -> [Text] -> [ScopeValue] -> [Text] -> [Text] -> Configuration [issuer] :: Configuration -> IssuerLocation [authorizationEndpoint] :: Configuration -> Text [tokenEndpoint] :: Configuration -> Text [userinfoEndpoint] :: Configuration -> Text [revocationEndpoint] :: Configuration -> Text [jwksUri] :: Configuration -> Text [responseTypesSupported] :: Configuration -> [Text] [subjectTypesSupported] :: Configuration -> [Text] [idTokenSigningAlgValuesSupported] :: Configuration -> [Text] [scopesSupported] :: Configuration -> [ScopeValue] [tokenEndpointAuthMethodsSupported] :: Configuration -> [Text] [claimsSupported] :: Configuration -> [Text] module Web.OIDC.Client -- | This data type represents information needed in the OpenID flow. data OIDC newOIDC :: Provider -> OIDC setCredentials :: ByteString -> ByteString -> ByteString -> OIDC -> OIDC