Safe Haskell | None |
---|
JSON Web Token implementation.
- data JWT = JWT {
- jwtCrypto :: JWTCrypto
- jwtClaimsSet :: ClaimsSet
- createJWSJWT :: CPRG g => g -> JWK -> JWSHeader -> ClaimsSet -> (Either Error JWT, g)
- validateJWSJWT :: JWK -> JWT -> Bool
- data ClaimsSet = ClaimsSet {}
- emptyClaimsSet :: ClaimsSet
- data Audience
- = General [StringOrURI]
- | Special StringOrURI
- data StringOrURI
- newtype IntDate = IntDate 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 :: JWK -> JWT -> BoolSource
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 :: ClaimsSetSource
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.