libjwt-typed-0.2: A Haskell implementation of JSON Web Token (JWT)
Safe HaskellSafe-Inferred
LanguageHaskell2010
Extensions
  • DerivingStrategies
  • ExistentialQuantification
  • ExplicitForAll

Libjwt.Exceptions

Description

Exceptions that may be thrown while decoding a token

Synopsis

Documentation

data SomeDecodeException Source #

The root of the decoding exceptions hierarchy. You can use it to catch all possible exceptions that may occur while decoding a token.

newtype DecodeException Source #

Thrown when the token does not represent a decodable JWT object i.e.

  • invalid UTF-8
  • malformed JSON
  • its signature cannot be verified

Basically, this token cannot be accepted for further processing because either we cannot determine its authenticity or it is garbage.

Constructors

DecodeException String 

newtype MissingClaim Source #

Raised when a required claim is not present in the JWT object

Constructors

Missing String 

data AlgorithmMismatch Source #

Raised when the JWT object uses a different algorithm in the header then the one we are trying to decode it with

Constructors

AlgorithmMismatch