jose-0.8.4: Javascript Object Signing and Encryption and JSON Web Token library

Safe HaskellNone
LanguageHaskell2010

Crypto.JOSE.Error

Contents

Description

JOSE error types.

Synopsis

Documentation

data Error Source #

All the errors that can occur.

Constructors

AlgorithmNotImplemented

A requested algorithm is not implemented

AlgorithmMismatch String

A requested algorithm cannot be used

KeyMismatch Text

Wrong type of key was given

KeySizeTooSmall

Key size is too small

OtherPrimesNotSupported

RSA private key with >2 primes not supported

RSAError Error

RSA encryption, decryption or signing error

CryptoError CryptoError

Various cryptonite library error cases

CompactDecodeError CompactDecodeError

Wrong number of parts in compact serialisation

JSONDecodeError String

JSON (Aeson) decoding error

NoUsableKeys

No usable keys were found in the key store

JWSCritUnprotected 
JWSNoValidSignatures

AnyValidated policy active, and no valid signature encountered

JWSInvalidSignature

AllValidated policy active, and invalid signature encountered

JWSNoSignatures

AllValidated policy active, and there were no signatures on object that matched the allowed algorithms

class AsError r where Source #

Minimal complete definition

_Error

Instances
AsError Error Source # 
Instance details

Defined in Crypto.JOSE.Error

AsError JWTError Source # 
Instance details

Defined in Crypto.JWT

JOSE compact serialisation errors

data InvalidNumberOfParts Source #

The wrong number of parts were found when decoding a compact JOSE object.

Constructors

InvalidNumberOfParts Natural Natural

expected vs actual parts

expectedParts :: Getter InvalidNumberOfParts Natural Source #

Get the expected or actual number of parts.

actualParts :: Getter InvalidNumberOfParts Natural Source #

Get the expected or actual number of parts.

data CompactTextError Source #

Bad UTF-8 data in a compact object, at the specified index

data CompactDecodeError Source #

An error when decoding a JOSE compact object. JSON decoding errors that occur during compact object processing throw JSONDecodeError.

Orphan instances

(MonadRandom m, MonadTrans t, Functor (t m), Monad (t m)) => MonadRandom (t m) Source # 
Instance details

Methods

getRandomBytes :: ByteArray byteArray => Int -> t m byteArray #