AuthorizationTokenResponse.fromJson constructor
AuthorizationTokenResponse.fromJson(
- Map<String, dynamic> json
)
Implementation
factory AuthorizationTokenResponse.fromJson(Map<String, dynamic> json) {
return AuthorizationTokenResponse(
accessToken: json['access_token'],
refreshToken: json['refresh_token'],
accessTokenExpirationDateTime: json['expires_in'] != null
? DateTime.now().add(Duration(seconds: json['expires_in']))
: null,
idToken: json['id_token'],
tokenType: json['token_type'],
scopes: json['scope']?.split(' '),
authorizationAdditionalParameters: json,
);
}