fromInterface static method

OpenIdUser fromInterface(
  1. OpenIdUserInterface openIdUserInterface
)

convert a OpenIdUserInterface to a OpenIdUser

Implementation

static OpenIdUser fromInterface(
  OpenIdUserInterface openIdUserInterface,
) {
  final address = openIdUserInterface.address;

  return OpenIdUser(
    id: openIdUserInterface.id,
    name: openIdUserInterface.name,
    preferredUsername: openIdUserInterface.preferredUsername,
    givenName: openIdUserInterface.givenName,
    familyName: openIdUserInterface.familyName,
    middleName: openIdUserInterface.middleName,
    nickname: openIdUserInterface.nickname,
    picture: openIdUserInterface.picture,
    website: openIdUserInterface.website,
    email: openIdUserInterface.email,
    emailVerified: openIdUserInterface.emailVerified,
    gender: openIdUserInterface.gender,
    zoneinfo: openIdUserInterface.zoneinfo,
    locale: openIdUserInterface.locale,
    phoneNumber: openIdUserInterface.phoneNumber,
    phoneNumberVerified: openIdUserInterface.phoneNumberVerified,
    address: address != null ? AddressConverter.fromInterface(address) : null,
    birthdate: openIdUserInterface.birthdate,
    externalId: openIdUserInterface.externalId,
  );
}