Token class

Represents an OAuth token used for authenticating with the API and performing actions. https://docs.joinmastodon.org/entities/token/

Annotations
  • @JsonSerializable()

Constructors

Token({required String accessToken, required String tokenType, required String scope, required DateTime createdAt})
Token.fromJson(Map<String, dynamic> json)
factory

Properties

accessToken String
An OAuth token to be used for authorization
final
createdAt DateTime
When the token was generated
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scope String
The OAuth scopes granted by this token, space-separated
final
tokenType String
The OAuth token type. Mastodon uses Bearer tokens
final

Methods

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.
inherited

Operators

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