fromTokenResponseString method

  1. @visibleForTesting
Credential fromTokenResponseString(
  1. Client client,
  2. String tokenResponseString
)

Converts tokenResponse String it into Credential

Implementation

@visibleForTesting
Credential fromTokenResponseString(
    Client client, String tokenResponseString) {
  final TokenResponse savedTokenResponse = _toObject(tokenResponseString);
  return client.createCredential(
      accessToken: savedTokenResponse.accessToken,
      tokenType: savedTokenResponse.tokenType,
      refreshToken: savedTokenResponse.refreshToken,
      expiresIn: savedTokenResponse.expiresIn,
      expiresAt: savedTokenResponse.expiresAt,
      idToken: savedTokenResponse.idToken.toCompactSerialization());
}