AccessTokenResponse class

Represents the response to an Access Token Request. see https://tools.ietf.org/html/rfc6749#section-5.2

Inheritance

Constructors

AccessTokenResponse({Map<String, dynamic> respMap = const {}, Exception? exception, StackTrace? stackTrace})
AccessTokenResponse.errorResponse({int httpStatusCode = 404, String? error, String? errorDescription, String? errorUri, Exception? exception, StackTrace? stackTrace})
AccessTokenResponse.fromHttpResponse(Response response, {List<String>? requestedScopes})
factory
AccessTokenResponse.fromMap(Map<String, dynamic> map, {Exception? exception, StackTrace? stackTrace})

Properties

accessToken → String?
no setter
error → String?
no setterinherited
errorDescription → String?
no setterinherited
errorUri → String?
no setterinherited
exception → Exception?
finalinherited
expirationDate → DateTime?
no setter
expiresIn → int?
no setter
hashCode → int
The hash code for this object.
no setterinherited
httpStatusCode → int
no setterinherited
refreshToken ↔ String?
getter/setter pair
respMap → Map<String, dynamic>
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scope ↔ List<String>?
getter/setter pair
stackTrace → StackTrace?
finalinherited
tokenType → String?
no setter

Methods

getRespField(String fieldName) → dynamic
inherited
hasRefreshToken() → bool
Checks if the refresh token has been returned by the server
isBearer() → bool
Checks if the token is a "Bearer" token
isExpired() → bool
Checks if the access token is expired
isValid() → bool
Checks if the access token request returned a valid status code
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
refreshNeeded({int secondsToExpiration = 30}) → bool
Checks if the access token must be refreshed
toMap() → Map<String, dynamic>
override
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited