asAuthCode method

AuthCode asAuthCode()

As an AuthCode.

Implementation

AuthCode asAuthCode() {
  return AuthCode()
    ..hasBeenExchanged = accessToken != null
    ..code = code!
    ..resourceOwnerIdentifier = resourceOwner!.id!
    ..issueDate = issueDate!
    ..requestedScopes = scope!.split(" ").map((s) => AuthScope(s)).toList()
    ..expirationDate = expirationDate!
    ..clientID = client!.id!;
}