express_dt library
Classes
- Cors
- Express
- ExpressJwtConfig
- JWT config model used to issue new JWT tokens
- ExpressJwtMap
- ExpressJwtValidationConfig
- Contains information to validate JWT claim set
- ExpressMethod
- ExpressRequest
- ExpressResponse
- JwtExpress
- An immutable set of claims for a Java Web Token (JWT).
- JwtSession
- JWT based session manager.
- MapCoder
- Codes, encrypts and signs the give Map.
- Router
- Session
- A per-request object containing session information of the request
- SessionIo
-
Reads and writes session data to
Context
- SessionIoAuthHeader
- Reads and writes session data from authorization header
- SessionIoCookie
- Reads and writes session data from cookies
- SessionIoHeader
- Reads and writes session data from cookies
- SessionManager
- Session manager to parse and write session data
Functions
-
defaultJWTHeaderCheck(
Map< String, dynamic> h) → bool - Default JOSE Header checker.
-
expressSign(
String id, String secretKey, {String? issuer, List< String> ? audience, Map<String, dynamic> ? otherClaims, Duration? maxAge}) → String - Issues a HMAC SHA-256 signed JWT.
-
expressVerify(
String token, String secretKey, {String? issuer, String? audience}) → Map? - Returns a map is the token is verified successfully
-
extractTokenFromHeader(
HttpHeaders headers) → String? - Extracts the token from the header
-
issueExpressToken(
JwtExpress claimSet, String hmacKey) → String - Issues a HMAC SHA-256 signed JWT.
-
verify1Session(
) → void -
verifyJwtHS256Signature(
String token, String hmacKey, {JOSEHeaderCheck? headerCheck = defaultJWTHeaderCheck, bool defaultIatExp = true, Duration maxAge = JwtExpress.defaultMaxAge}) → JwtExpress - Verifies the signature and extracts the claim set from a JWT.
-
verifySession(
ExpressRequest req, ExpressResponse res, {String authorizationKey = 'id', bool throwOnFail = true}) → Future?
Typedefs
-
JOSEHeaderCheck
= bool Function(Map<
String, dynamic> joseHeader) - Header checking function type used by verifyJwtHS256Signature.
Exceptions / Errors
- JwtExpressException
- JWT exception thrown when an invalid token is encountered while parsing JWT token.