libjwt-typed-0.2: A Haskell implementation of JSON Web Token (JWT)
Safe HaskellNone
LanguageHaskell2010
Extensions
  • DerivingStrategies
  • MagicHash
  • GeneralizedNewtypeDeriving

Libjwt.FFI.Jwt

Description

Interface to C libraries

Synopsis

Documentation

data JwtIO a Source #

IO restricted to calling libjwt and jsmn

Instances

Instances details
Monad JwtIO Source # 
Instance details

Defined in Libjwt.FFI.Jwt

Methods

(>>=) :: JwtIO a -> (a -> JwtIO b) -> JwtIO b #

(>>) :: JwtIO a -> JwtIO b -> JwtIO b #

return :: a -> JwtIO a #

Functor JwtIO Source # 
Instance details

Defined in Libjwt.FFI.Jwt

Methods

fmap :: (a -> b) -> JwtIO a -> JwtIO b #

(<$) :: a -> JwtIO b -> JwtIO a #

Applicative JwtIO Source # 
Instance details

Defined in Libjwt.FFI.Jwt

Methods

pure :: a -> JwtIO a #

(<*>) :: JwtIO (a -> b) -> JwtIO a -> JwtIO b #

liftA2 :: (a -> b -> c) -> JwtIO a -> JwtIO b -> JwtIO c #

(*>) :: JwtIO a -> JwtIO b -> JwtIO b #

(<*) :: JwtIO a -> JwtIO b -> JwtIO a #

MonadThrow JwtIO Source # 
Instance details

Defined in Libjwt.FFI.Jwt

Methods

throwM :: Exception e => e -> JwtIO a #

MonadCatch JwtIO Source # 
Instance details

Defined in Libjwt.FFI.Jwt

Methods

catch :: Exception e => JwtIO a -> (e -> JwtIO a) -> JwtIO a #

data JwtT Source #

Wrapped pointer to jwt_t with managed lifetime

jwtSetAlg :: JwtAlgT -> ByteString -> JwtT -> JwtIO () Source #

jwtGetAlg :: JwtT -> JwtIO JwtAlgT Source #

data JsonToken Source #

Low-level representation of JSON tokenization. Tokens are an exact representation of the underlying JSON, ie no conversions or unescaping has been performed.

The only exception is JsStr which is already unquoted (JsStr value is the string between the first and last quotation marks of the corresponding JSON string).

JSON objects are not parsed at all, but presented as one byte string (JsBlob).