Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- jwtAuthCheck :: FromJWT usr => JWTSettings -> AuthCheck usr
- makeJWT :: ToJWT a => a -> JWTSettings -> Maybe UTCTime -> IO (Either Error ByteString)
- verifyJWT :: FromJWT a => JWTSettings -> ByteString -> IO (Maybe a)
Documentation
jwtAuthCheck :: FromJWT usr => JWTSettings -> AuthCheck usr Source #
A JWT AuthCheck
. You likely won't need to use this directly unless you
are protecting a Raw
endpoint.
makeJWT :: ToJWT a => a -> JWTSettings -> Maybe UTCTime -> IO (Either Error ByteString) Source #
Creates a JWT containing the specified data. The data is stored in the
dat
claim. The 'Maybe UTCTime' argument indicates the time at which the
token expires.
verifyJWT :: FromJWT a => JWTSettings -> ByteString -> IO (Maybe a) Source #