module Web.OIDC.Client.Tokens
(
Tokens(..)
, IdToken(..)
, IdTokenClaims(..)
) where
import Data.Text (Text)
import Jose.Jwt (Jwt, IntDate)
import Prelude hiding (exp)
data Tokens = Tokens
{ accessToken :: Text
, tokenType :: Text
, idToken :: IdToken
, expiresIn :: Maybe Integer
, refreshToken :: Maybe Text
}
deriving (Show, Eq)
data IdToken = IdToken
{ claims :: IdTokenClaims
, jwt :: Jwt
}
deriving (Show, Eq)
data IdTokenClaims = IdTokenClaims
{ iss :: Text
, sub :: Text
, aud :: [Text]
, exp :: IntDate
, iat :: IntDate
}
deriving (Show, Eq)