JwtTokenHelper class
- Implemented types
Constructors
- JwtTokenHelper()
-
factory
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
-
decode(
String token) → Map< String, dynamic> -
Decodes the
tokeninto a Map of claims.override -
getExpirationDate(
String token) → DateTime? -
Extracts the expiration date from the
token. Returns null if the token is invalid or does not have an expiration claim.override -
getRemainingTime(
String token) → Duration -
Returns the duration remaining until the
tokenexpires. Returns Duration.zero if already expired or invalid.override -
isExpired(
String token) → bool -
Checks if the provided
tokenis expired.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
tryDecode(
String token) → Map< String, dynamic> ? -
Tries to decodes the
tokeninto a Map of claims, returns null if decoding fails.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → JwtTokenHelper
-
final