DescopeToken class abstract
A DescopeToken is a utility wrapper around a single JWT value.
The session and refresh JWTs in a DescopeSession are stored as instances of DescopeToken. It's also returned directly when exchanging an access key for a session JWT.
Constructors
Properties
-
customClaims
→ Map<
String, dynamic> -
A map with all the custom claims in the JWT value. It includes
any claims whose values aren't already exposed by other accessors
or authorization functions.
no setter
- expiresAt → DateTime?
-
The value of the "exp" (expiration time) claim which is the time
after which the JWT expires.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
The value of the "sub" (subject) claim, which is the unique id
of the user or access key the JWT was generated for.
no setter
- isExpired → bool
-
Whether the JWT expiry time (if any) has already passed.
no setter
- jwt → String
-
The underlying JWT value
no setter
- projectId → String
-
The value of the "iss" (issuer) claim which is the unique id
of the Descope project the JWT was generated for.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getPermissions(
{required String? tenant}) → List< String> -
Returns the list of permissions granted in the JWT claims. Pass
a value of
null
for thetenant
parameter if the project doesn't use multiple tenants. -
getRoles(
{required String? tenant}) → List< String> -
Returns the list of roles granted in the JWT claims. Pass
a value of
null
for thetenant
parameter if the project doesn't use multiple tenants. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited