oidc-client-0.1.0.1: OpenID Connect 1.0 library for RP

Maintainerkrdlab@gmail.com
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Web.OIDC.Client

Contents

Description

 

Synopsis

Client Obtains ID Token and Access Token

data OIDC Source

This data type represents information needed in the OpenID flow.

newOIDC :: CPRG g => IORef g -> OIDC Source

Create OIDC.

First argument is used in a token decoding on ID Token Validation.

setProvider Source

Arguments

:: Provider

OP's information (obtain by discover)

-> OIDC 
-> OIDC 

setCredentials Source

Arguments

:: ByteString

client ID

-> ByteString

client secret

-> ByteString

redirect URI

-> OIDC 
-> OIDC 

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

data Provider Source

An OpenID Provider information

data IdToken Source

Constructors

IdToken 

Fields

claims :: IdTokenClaims
 
jwt :: Jwt
 

data IdTokenClaims Source

Constructors

IdTokenClaims 

Fields

iss :: String
 
sub :: String
 
aud :: [String]
 
exp :: IntDate
 
iat :: IntDate
 

Exception

Re-exports

module Jose.Jwt