OAuthToken
Holds information of a token issued by an OAuth authorization endpoint.
- Annotations
-
- @JsonSerializable(fieldRename: FieldRename.snake, includeIfNull: false, explicitToJson: true)
Constructors
OAuthToken.fromJson
OAuthToken.fromTokenResponse
- OidcToken response
OAuthToken
Properties
accessToken
The OAuth access token.
expiresAt
Expires at DateTime.
expiresIn
The number of seconds until this token expires.
hasExpired
Has the access token expired?
idToken
The ID token used to uniquely identify the user with KeyCloak.
issuedDate
The date the access token was issued.
refreshToken
The OAuth refresh token.
scope
Scope of this token:
tokenInfo
tokenType
The type of token.
Methods
clone
Clone this token.
expire
Expire the authenticated OAuth token for this user.
toJson
toString
A string representation of this object.
Some classes have a default textual representation, often paired with a static parse function (like int.parse). These classes will provide the textual representation as their string representation.
Other classes have no meaningful textual representation that a program will care about. Such classes will typically override toString to provide useful information when inspecting the object, mainly for debugging or logging.