Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Extensions |
|
Exceptions that may be thrown while decoding a token
Synopsis
- data SomeDecodeException
- newtype DecodeException = DecodeException String
- newtype MissingClaim = Missing String
- data AlgorithmMismatch = AlgorithmMismatch
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.
Instances
Show SomeDecodeException Source # | |
Defined in Libjwt.Exceptions showsPrec :: Int -> SomeDecodeException -> ShowS # show :: SomeDecodeException -> String # showList :: [SomeDecodeException] -> ShowS # | |
Exception SomeDecodeException Source # | |
Defined in Libjwt.Exceptions |
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.
Instances
Show DecodeException Source # | |
Defined in Libjwt.Exceptions showsPrec :: Int -> DecodeException -> ShowS # show :: DecodeException -> String # showList :: [DecodeException] -> ShowS # | |
Exception DecodeException Source # | |
Defined in Libjwt.Exceptions |
newtype MissingClaim Source #
Raised when a required claim is not present in the JWT object
Instances
Show MissingClaim Source # | |
Defined in Libjwt.Exceptions showsPrec :: Int -> MissingClaim -> ShowS # show :: MissingClaim -> String # showList :: [MissingClaim] -> ShowS # | |
Exception MissingClaim Source # | |
Defined in Libjwt.Exceptions |
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
Instances
Show AlgorithmMismatch Source # | |
Defined in Libjwt.Exceptions showsPrec :: Int -> AlgorithmMismatch -> ShowS # show :: AlgorithmMismatch -> String # showList :: [AlgorithmMismatch] -> ShowS # | |
Exception AlgorithmMismatch Source # | |
Defined in Libjwt.Exceptions |