OAuthToken class
Holds information of a token issued by an OAuth authorization endpoint.
- Annotations
-
- @JsonSerializable(fieldRename: FieldRename.snake, includeIfNull: false)
Constructors
- OAuthToken.new(String accessToken, String refreshToken, String tokenType, int expiresIn, String scope)
- Constructor
-
OAuthToken.fromJson(Map<
String, dynamic> json) -
factory
-
OAuthToken.fromMap(Map<
String, dynamic> map) - Constructor taking a Map.
Properties
- accessToken → String
-
The OAuth access token.
final
- accessTokenExpiryDate → DateTime
-
Calculate the date of expiration for the access token.
no setter
- expiresIn ↔ int
-
Expires in seconds.
getter/setter pair
- hasExpired → bool
-
Has the access token expired?
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- 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 → 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