CheckTokenResponse class

Represents the response data model for checking a token's validity.

This model provides details about a given bearer token, including associated user information (if applicable), scopes, authorities, expiration time, and client ID. In the case of a client credentials flow token, userName will be null.

Annotations
  • @immutable

Constructors

CheckTokenResponse({required String? userName, required List<BattleNetScope> scope, required List<String> accountAuthorities, required int exp, required List<String> clientAuthorities, required List<String> authorities, required String clientId})
Creates an instance of CheckTokenResponse.
const
CheckTokenResponse.fromJson(Map<String, dynamic> json)
Creates an instance of CheckTokenResponse from a JSON map.
factory
CheckTokenResponse.fromRawJson(String str)
Creates an instance of CheckTokenResponse from a JSON string.
factory

Properties

accountAuthorities List<String>
A list of authorities associated with the user's account.
final
authorities List<String>
A list of authorities granted to the token.
final
clientAuthorities List<String>
A list of authorities associated with the client.
final
clientId String
The client ID associated with the token.
final
exp int
The expiration time of the token, represented as a Unix timestamp.
final
hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scope List<BattleNetScope>
A list of scopes that the token is valid for.
final
userName String?
The username associated with the token. Can be null for client credentials flow.
final

Methods

copyWith({String? userName, List<BattleNetScope>? scope, List<String>? accountAuthorities, int? exp, List<String>? clientAuthorities, List<String>? authorities, String? clientId}) CheckTokenResponse
Returns a copy of this instance with the given fields replaced by new values.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts this instance to a JSON map.
toRawJson() String
Converts this instance to a JSON string.
toString() String
A string representation of this object.
override

Operators

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