Safe Haskell | None |
---|---|
Language | Haskell98 |
JSON Web Token implementation.
- data JWT = JWT {
- jwtCrypto :: JWTCrypto
- jwtClaimsSet :: ClaimsSet
- createJWSJWT :: CPRG g => g -> JWK -> JWSHeader -> ClaimsSet -> (Either Error JWT, g)
- validateJWSJWT :: ValidationAlgorithms -> ValidationPolicy -> JWK -> JWT -> Bool
- data ClaimsSet = ClaimsSet {}
- emptyClaimsSet :: ClaimsSet
- data Audience
- data StringOrURI
- newtype NumericDate = NumericDate UTCTime
Documentation
JSON Web Token data.
JWT | |
|
createJWSJWT :: CPRG g => g -> JWK -> JWSHeader -> ClaimsSet -> (Either Error JWT, g) Source
Create a JWT that is a JWS.
validateJWSJWT :: ValidationAlgorithms -> ValidationPolicy -> JWK -> JWT -> Bool Source
Validate a JWT as a JWS (JSON Web Signature).
The JWT Claims Set represents a JSON object whose members are the claims conveyed by the JWT.
ClaimsSet | |
|
emptyClaimsSet :: ClaimsSet Source
Return an empty claims set.
Audience data. In the general case, the aud value is an
array of case-sensitive strings, each containing a StringOrURI
value. In the special case when the JWT has one audience, the
aud value MAY be a single case-sensitive string containing a
StringOrURI
value.
data StringOrURI Source
A JSON string value, with the additional requirement that while arbitrary string values MAY be used, any value containing a : character MUST be a URI.
newtype NumericDate Source
A JSON numeric value representing the number of seconds from 1970-01-01T0:0:0Z UTC until the specified UTC date/time.