JsonWebTokenHandler class
Generates and parses JWT tokens
Constructors
- JsonWebTokenHandler(String key)
-
Constructs a JsonWebTokenHandler with the specified
key
for signing the generated tokens and validating the tokens to be parsed.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
generate(
JwtPayload payload) → String -
Creates a new JWT token with a payload represented by
payload
. -
load(
String token) → JwtPayload - Parses a JWT token, validating it, and returns a JwtPayload representing its contents.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited