| Safe Haskell | None | 
|---|---|
| Language | Haskell98 | 
Crypto.JOSE.Header
Description
Types and functions for working with JOSE header parameters.
- class HasParams a where
 - parseParams :: forall a. HasParams a => Maybe Object -> Maybe Object -> Parser a
 - protectedParamsEncoded :: HasParams a => a -> ByteString
 - unprotectedParams :: HasParams a => a -> Maybe Value
 - parseCrit :: (Foldable t0, Foldable t1, Traversable t2, Traversable t3, Monad m) => t0 Text -> t1 Text -> Object -> t2 (t3 Text) -> m (t2 (t3 Text))
 - data Protection
 - data HeaderParam a = HeaderParam Protection a
 - protection :: HeaderParam a -> Protection
 - param :: HeaderParam a -> a
 - headerRequired :: FromJSON a => Text -> Maybe Object -> Maybe Object -> Parser (HeaderParam a)
 - headerOptional :: FromJSON a => Text -> Maybe Object -> Maybe Object -> Parser (Maybe (HeaderParam a))
 - headerOptionalProtected :: FromJSON a => Text -> Maybe Object -> Maybe Object -> Parser (Maybe a)
 
Documentation
class HasParams a where Source #
Minimal complete definition
protectedParamsEncoded :: HasParams a => a -> ByteString Source #
parseCrit :: (Foldable t0, Foldable t1, Traversable t2, Traversable t3, Monad m) => t0 Text -> t1 Text -> Object -> t2 (t3 Text) -> m (t2 (t3 Text)) Source #
data HeaderParam a Source #
Constructors
| HeaderParam Protection a | 
Instances
| Eq a => Eq (HeaderParam a) Source # | |
| Show a => Show (HeaderParam a) Source # | |
protection :: HeaderParam a -> Protection Source #
param :: HeaderParam a -> a Source #
headerRequired :: FromJSON a => Text -> Maybe Object -> Maybe Object -> Parser (HeaderParam a) Source #
Parse a required parameter that may be carried in either the protected or the unprotected header.