Safe Haskell | None |
---|---|
Language | Haskell2010 |
Extensions |
|
Interface to C libraries
Synopsis
- data JwtIO a
- unsafePerformJwtIO :: JwtIO a -> a
- data JwtT
- mkJwtT :: JwtIO JwtT
- jwtDecode :: ByteString -> ByteString -> JwtIO JwtT
- jwtEncode :: JwtT -> JwtIO ByteString
- addGrant :: String -> ByteString -> JwtT -> JwtIO ()
- addGrantBool :: String -> Bool -> JwtT -> JwtIO ()
- addGrantInt :: String -> Int -> JwtT -> JwtIO ()
- addGrantInt64 :: String -> Int64 -> JwtT -> JwtIO ()
- addGrantsFromJson :: ByteString -> JwtT -> JwtIO ()
- jwtSetAlg :: JwtAlgT -> ByteString -> JwtT -> JwtIO ()
- addHeader :: String -> ByteString -> JwtT -> JwtIO ()
- getGrant :: String -> JwtT -> JwtIO (Maybe ByteString)
- getGrantBool :: String -> JwtT -> JwtIO (Maybe Bool)
- getGrantInt :: String -> JwtT -> JwtIO (Maybe Int)
- getGrantInt64 :: String -> JwtT -> JwtIO (Maybe Int64)
- getGrantAsJson :: String -> JwtT -> JwtIO (Maybe ByteString)
- jwtGetAlg :: JwtT -> JwtIO JwtAlgT
- getHeader :: String -> JwtT -> JwtIO (Maybe ByteString)
- unsafeAddGrant :: Addr# -> ByteString -> JwtT -> JwtIO ()
- unsafeAddGrantBool :: Addr# -> Bool -> JwtT -> JwtIO ()
- unsafeAddGrantInt :: Addr# -> Int -> JwtT -> JwtIO ()
- unsafeAddGrantInt64 :: Addr# -> Int64 -> JwtT -> JwtIO ()
- unsafeAddHeader :: Addr# -> ByteString -> JwtT -> JwtIO ()
- unsafeGetGrant :: Addr# -> JwtT -> JwtIO (Maybe ByteString)
- unsafeGetGrantBool :: Addr# -> JwtT -> JwtIO (Maybe Bool)
- unsafeGetGrantInt :: Addr# -> JwtT -> JwtIO (Maybe Int)
- unsafeGetGrantInt64 :: Addr# -> JwtT -> JwtIO (Maybe Int64)
- unsafeGetGrantAsJson :: Addr# -> JwtT -> JwtIO (Maybe ByteString)
- unsafeGetHeader :: Addr# -> JwtT -> JwtIO (Maybe ByteString)
- data JsonToken
- unsafeMapTokenizedJsonArray :: (JsonToken -> b) -> ByteString -> JwtIO (Maybe [b])
Documentation
IO restricted to calling libjwt and jsmn
unsafePerformJwtIO :: JwtIO a -> a Source #
jwtDecode :: ByteString -> ByteString -> JwtIO JwtT Source #
addGrantsFromJson :: ByteString -> JwtT -> JwtIO () Source #
getGrantAsJson :: String -> JwtT -> JwtIO (Maybe ByteString) Source #
unsafeAddGrant :: Addr# -> ByteString -> JwtT -> JwtIO () Source #
unsafeAddHeader :: Addr# -> ByteString -> JwtT -> JwtIO () Source #
unsafeGetGrant :: Addr# -> JwtT -> JwtIO (Maybe ByteString) Source #
unsafeGetGrantAsJson :: Addr# -> JwtT -> JwtIO (Maybe ByteString) Source #
unsafeGetHeader :: Addr# -> JwtT -> JwtIO (Maybe ByteString) 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
).
unsafeMapTokenizedJsonArray :: (JsonToken -> b) -> ByteString -> JwtIO (Maybe [b]) Source #