fromInterface static method

AuthToken fromInterface(
  1. AuthTokenInterface authTokenInterface
)

convert a AuthTokenInterface to a AuthToken

Implementation

static AuthToken fromInterface(
  AuthTokenInterface authTokenInterface,
) {
  final user = authTokenInterface.user;

  return AuthToken(
    idToken: authTokenInterface.idToken,
    accessToken: authTokenInterface.accessToken,
    refreshToken: authTokenInterface.refreshToken,
    tokenType: authTokenInterface.tokenType,
    expiresIn: authTokenInterface.expiresIn,
    user: user != null ? OpenIdUserConverter.fromInterface(user) : null,
  );
}