| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
| Extensions |
|
Libjwt.Exceptions
Description
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 Methods showsPrec :: Int -> SomeDecodeException -> ShowS # show :: SomeDecodeException -> String # showList :: [SomeDecodeException] -> ShowS # | |
| Exception SomeDecodeException Source # | |
Defined in Libjwt.Exceptions Methods toException :: SomeDecodeException -> SomeException # fromException :: SomeException -> Maybe SomeDecodeException # | |
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 |
Instances
| Show DecodeException Source # | |
Defined in Libjwt.Exceptions Methods showsPrec :: Int -> DecodeException -> ShowS # show :: DecodeException -> String # showList :: [DecodeException] -> ShowS # | |
| Exception DecodeException Source # | |
Defined in Libjwt.Exceptions Methods toException :: DecodeException -> SomeException # | |
newtype MissingClaim Source #
Raised when a required claim is not present in the JWT object
Instances
| Show MissingClaim Source # | |
Defined in Libjwt.Exceptions Methods showsPrec :: Int -> MissingClaim -> ShowS # show :: MissingClaim -> String # showList :: [MissingClaim] -> ShowS # | |
| Exception MissingClaim Source # | |
Defined in Libjwt.Exceptions Methods toException :: MissingClaim -> SomeException # fromException :: SomeException -> Maybe MissingClaim # displayException :: MissingClaim -> 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 |
Instances
| Show AlgorithmMismatch Source # | |
Defined in Libjwt.Exceptions Methods showsPrec :: Int -> AlgorithmMismatch -> ShowS # show :: AlgorithmMismatch -> String # showList :: [AlgorithmMismatch] -> ShowS # | |
| Exception AlgorithmMismatch Source # | |
Defined in Libjwt.Exceptions Methods toException :: AlgorithmMismatch -> SomeException # | |