CheckTokenResponse.fromJson constructor
Creates an instance of CheckTokenResponse from a JSON map.
Implementation
factory CheckTokenResponse.fromJson(Map<String, dynamic> json) =>
CheckTokenResponse(
userName: json['user_name'],
scope: List<BattleNetScope>.from(
json['scope'].map(
(dynamic x) => BattleNetScope.values.firstWhere(
(BattleNetScope element) => element.name == x,
),
),
),
accountAuthorities: List<String>.from(
json['account_authorities'].map((dynamic x) => x),
),
exp: json['exp'],
clientAuthorities: List<String>.from(
json['client_authorities'].map((dynamic x) => x),
),
authorities: List<String>.from(
json['authorities'].map((dynamic x) => x),
),
clientId: json['client_id'],
);