OAuthToken class
Holds information of a token issued by an OAuth authorization endpoint.
- Annotations
-
- @JsonSerializable(fieldRename: FieldRename.snake, includeIfNull: false, explicitToJson: true)
Constructors
-
OAuthToken(String accessToken, String refreshToken, String tokenType, DateTime expiresAt, List<
String> scope, String idToken) - Constructor
-
OAuthToken.fromJson(Map<
String, dynamic> json) -
factory
- OAuthToken.fromTokenResponse(OidcToken response)
-
factory
Properties
- accessToken → String
-
The OAuth access token.
final
- expiresAt ↔ DateTime
-
Expires at DateTime.
getter/setter pair
- expiresIn ↔ int?
-
The number of seconds until this token expires.
getter/setter pair
- hasExpired → bool
-
Has the access token expired?
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- idToken → String
-
The ID token used to uniquely identify the user with KeyCloak.
final
- issuedDate → DateTime
-
The date the access token was issued.
final
- refreshToken → String
-
The OAuth refresh token.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
scope
→ List<
String> -
Scope of this token:
final
- tokenInfo → String
-
no setter
- tokenType → String
-
The type of token.
final
Methods
-
clone(
) → OAuthToken - Clone this token.
-
expire(
) → void - Expire the authenticated OAuth token for this user.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited