JwtSecurity class

JSON web token authentication security that validates JWT tokens and extracts the client claims from it.

The issuer URI and client ID are used to verify the JWT token are authentic.

See https://jwt.io/

Implemented types

Constructors

JwtSecurity({required Uri issuerUri, required String clientId})

Properties

clientId String
final
hashCode int
The hash code for this object.
no setterinherited
issuerUri Uri
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
verify(Map<String, String> headers, Secured secured) Future<bool>
Verify the client is allowed to access this resource. Headers contains all HTTP headers, path and query parameters. Secured contains the security metadata on the annotated method. Implementations should extract the claims from headers and verify the condition in secured.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited