jose-jwt-0.1: JSON Object Signing and Encryption Library

Safe HaskellNone

Jose.Jwt

Synopsis

Documentation

data Jwt Source

A decoded JWT which can be either a JWE or a JWS.

Constructors

Jws !Jws 
Jwe !Jwe 

type Jwe = (JweHeader, ByteString)Source

The header and claims of a decoded JWE.

type Jws = (JwsHeader, ByteString)Source

The header and claims of a decoded JWS.

data JwsHeader Source

Header content for a JWS.

Constructors

JwsHeader 

data JwtError Source

Decoding errors.

Constructors

KeyError Text

No suitable key or wrong key type

BadDots Int

Wrong number of . characters in the JWT

BadHeader

Header couldn't be decoded or contains bad data

BadSignature

Signature is invalid

BadCrypto

A cryptographic operation failed

Base64Error String

A base64 decoding error

Instances

decodeSource

Arguments

:: JwkSet

The keys to use for decoding

-> ByteString

The encoded JWT

-> Either JwtError Jwt

The decoded JWT, if successful

Uses the supplied keys to decode a JWT. Locates a matching key by header kid value where possible or by suitable key type. The JWK use and alg options are currently ignored.