openid-connect-0.2.0: An OpenID Connect library that does all the heavy lifting for you
CopyrightThis file is part of the package openid-connect. It is subject to
the license terms in the LICENSE file found in the top-level
directory of this distribution and at:

https://code.devalot.com/open/openid-connect

No part of this package including this file may be copied
modified propagated or distributed except according to the terms
contained in the LICENSE file.
LicenseBSD-2-Clause
Safe HaskellSafe-Inferred
LanguageHaskell2010

OpenID.Connect.Client.Provider

Description

Provider details needed by clients.

Synopsis

Provider discovery

type ProviderDiscoveryURI = URI Source #

URI pointing to an OpenID Connect provider's discovery document.

If necessary, the well-known discovery path will be added automatically.

A list of certified OpenID Connect providers can be found here: https://openid.net/certification/

Since: 0.1.0.0

discovery Source #

Arguments

:: Applicative f 
=> HTTPS f

A function that can make HTTPS requests.

-> ProviderDiscoveryURI

The provider's discovery URI.

-> f (Either DiscoveryError (Discovery, Maybe UTCTime)) 

Fetch the provider's discovery document.

Included with the discovery document is a UTCTime value indicating the time at which the content will expire and should be expunged from your cache. Obviously Nothing indicates that the value cannot be cached.

If the given ProviderDiscoveryURI is missing its path component, or the path component is / it will be rewritten to the well-known discovery path.

Since: 0.1.0.0

Provider key sets

keysFromDiscovery Source #

Arguments

:: Applicative f 
=> HTTPS f

A function that can make HTTPS requests.

-> Discovery

The provider's discovery document.

-> f (Either DiscoveryError (JWKSet, Maybe UTCTime)) 

Fetch the provider's key set.

Included with the key set is a UTCTime value indicating the time at which the content will expire and should be expunged from your cache.

Since: 0.1.0.0

Provider convenience record

data Provider Source #

A provider record is made up of their discovery document and keys.

Since: 0.1.0.0

Constructors

Provider 

Fields

discoveryAndKeys Source #

Arguments

:: Monad m 
=> HTTPS m

A function that can make HTTPS requests.

-> ProviderDiscoveryURI

The provider's discovery URI.

-> m (Either DiscoveryError (Provider, Maybe UTCTime)) 

Fetch a provider's discovery document and key set.

This is a convenience function that simply calls discovery and keysFromDiscovery, wrapping them in a Provider.

If you are caching the results of these functions you probably want to call them individually since they might have very different cache expiration times.

The expiration time returned from this function is the lesser of the two constituents.

Since: 0.1.0.0

Error handling

data DiscoveryError Source #

Errors that may occur during provider discovery.

Since: 0.1.0.0

Constructors

DiscoveryFailedError ErrorResponse

Failed to decode JSON from the provider.

InvalidUriError Text

A provider's URI is invalid. The URI is provided as Text for debugging purposes.

Discovery document

data Discovery Source #

The provider discovery document as specified in OpenID Connect Discovery 1.0 §3.

Since: 0.1.0.0

Constructors

Discovery 

Fields

Instances

Instances details
FromJSON Discovery Source # 
Instance details

Defined in OpenID.Connect.Discovery

ToJSON Discovery Source # 
Instance details

Defined in OpenID.Connect.Discovery

Generic Discovery Source # 
Instance details

Defined in OpenID.Connect.Discovery

Associated Types

type Rep Discovery :: Type -> Type #

Show Discovery Source # 
Instance details

Defined in OpenID.Connect.Discovery

type Rep Discovery Source # 
Instance details

Defined in OpenID.Connect.Discovery

type Rep Discovery = D1 ('MetaData "Discovery" "OpenID.Connect.Discovery" "openid-connect-0.2.0-9NUCQOfqK7L3ZMFQIg1Sgd" 'False) (C1 ('MetaCons "Discovery" 'PrefixI 'True) (((((S1 ('MetaSel ('Just "issuer") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 URI) :*: S1 ('MetaSel ('Just "authorizationEndpoint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 URI)) :*: (S1 ('MetaSel ('Just "tokenEndpoint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe URI)) :*: S1 ('MetaSel ('Just "userinfoEndpoint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe URI)))) :*: ((S1 ('MetaSel ('Just "jwksUri") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 URI) :*: S1 ('MetaSel ('Just "registrationEndpoint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe URI))) :*: (S1 ('MetaSel ('Just "scopesSupported") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Scope)) :*: S1 ('MetaSel ('Just "responseTypesSupported") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty Text))))) :*: (((S1 ('MetaSel ('Just "responseModesSupported") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (NonEmpty Text))) :*: S1 ('MetaSel ('Just "grantTypesSupported") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (NonEmpty Text)))) :*: (S1 ('MetaSel ('Just "acrValuesSupported") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (NonEmpty Text))) :*: S1 ('MetaSel ('Just "subjectTypesSupported") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty Text)))) :*: ((S1 ('MetaSel ('Just "idTokenSigningAlgValuesSupported") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty Text)) :*: S1 ('MetaSel ('Just "idTokenEncryptionAlgValuesSupported") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (NonEmpty Text)))) :*: (S1 ('MetaSel ('Just "idTokenEncryptionEncValuesSupported") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (NonEmpty Text))) :*: (S1 ('MetaSel ('Just "userinfoSigningAlgValuesSupported") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (NonEmpty Text))) :*: S1 ('MetaSel ('Just "userinfoEncryptionAlgValuesSupported") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (NonEmpty Text)))))))) :*: ((((S1 ('MetaSel ('Just "userinfoEncryptionEncValuesSupported") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (NonEmpty Text))) :*: S1 ('MetaSel ('Just "requestObjectSigningAlgValuesSupported") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (NonEmpty Text)))) :*: (S1 ('MetaSel ('Just "requestObjectEncryptionAlgValuesSupported") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (NonEmpty Text))) :*: S1 ('MetaSel ('Just "requestObjectEncryptionEncValuesSupported") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (NonEmpty Text))))) :*: ((S1 ('MetaSel ('Just "tokenEndpointAuthMethodsSupported") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (NonEmpty ClientAuthentication))) :*: S1 ('MetaSel ('Just "tokenEndpointAuthSigningAlgValuesSupported") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (NonEmpty Text)))) :*: (S1 ('MetaSel ('Just "displayValuesSupported") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (NonEmpty Text))) :*: (S1 ('MetaSel ('Just "claimTypesSupported") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (NonEmpty Text))) :*: S1 ('MetaSel ('Just "claimsSupported") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (NonEmpty Text))))))) :*: (((S1 ('MetaSel ('Just "serviceDocumentation") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "claimsLocalesSupported") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (NonEmpty Text)))) :*: (S1 ('MetaSel ('Just "claimsParameterSupported") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "requestParameterSupported") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)))) :*: ((S1 ('MetaSel ('Just "requestUriParameterSupported") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "requireRequestUriRegistration") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool))) :*: (S1 ('MetaSel ('Just "opPolicyUri") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe URI)) :*: (S1 ('MetaSel ('Just "opTosUri") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe URI)) :*: S1 ('MetaSel ('Just "endSessionEndpoint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe URI)))))))))

Re-exports:

newtype URI Source #

A wrapper around the Network.URI type that supports ToJSON and FromJSON.

Since: 0.1.0.0

Constructors

URI 

Fields

Instances

Instances details
FromJSON URI Source # 
Instance details

Defined in OpenID.Connect.JSON

ToJSON URI Source # 
Instance details

Defined in OpenID.Connect.JSON

Show URI Source # 
Instance details

Defined in OpenID.Connect.JSON

Methods

showsPrec :: Int -> URI -> ShowS #

show :: URI -> String #

showList :: [URI] -> ShowS #

Eq URI Source # 
Instance details

Defined in OpenID.Connect.JSON

Methods

(==) :: URI -> URI -> Bool #

(/=) :: URI -> URI -> Bool #

uriToText :: URI -> Text Source #

Helper for rendering a URI as Text.