convertToTokenResponse method
TokenResponse
convertToTokenResponse(
- Map<String, dynamic> json
)
Implementation
TokenResponse convertToTokenResponse(Map<String, dynamic> json) {
return AuthorizationTokenResponse(
json['access_token'] as String,
json['refresh_token'] as String,
// Expires in is in seconds, but the DateTime expects milliseconds.
DateTime.now().add(
Duration(seconds: json['expires_in'] as int),
),
json['session_state'] as String,
json['token_type'] as String,
(json['scope'] as String).split(' '),
null,
null,
);
}