AccessToken class

Represents access tokens.

You need an access token before accessing all of the API. Access tokens could be obtained by various authentication flows, such as ClientCredentialsFlowApi, AuthCodeFlow, DeviceCodeApi/DeviceCodeFlowTokenApi, PasswordFlowApi, and so on.

Constructors

AccessToken({String accessToken, int expiresIn, String refreshToken, Set<Scope> scopes, String tokenType})
Creates a new instance.
AccessToken.fromMap(Map map)
Creates a new instance.
factory

Properties

accessToken String
The access token.
final
expiresIn int
When will the access token expire since now in seconds.
final
hashCode int
The hash code for this object. [...]
read-only, inherited
refreshToken String
The refresh token. Might be null.
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
scopes Set<Scope>
The scopes of the access token. Might be null.
final
tokenType String
The type of the token.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toJson() Map
Converts to a map representation;
toMap() Map
Converts to a map representation;
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited

Static Methods

validate(Map map) bool
Validates if we can convert a map to an OneTimePassword object.