Class ExternalProfile

Represents the credentials of a customer.

Since 13.6 it is possible to have customers who are not authenticated through a login and password but through an external authentication provider via the OAuth2 protocol.

In such cases, the AuthenticationProviderID will point to an OAuth provider configured in the system and the ExternalID will be the unique identifier of the customer on the Authentication Provider's system.

For example, if an authentication provider with ID "Google123" is configured pointing to Google and the customer has a logged in into Google in the past and has created a profile there, Google assigns a unique number identifier to that customer. If the storefront is configured to allow authentication through Google and a new customer logs into the storefront using Google, the AuthenticationProviderID property of his Credentials will contain "Google123" and the ExternalID property will contain whatever unique identifier Google has assigned to him.

Note: this class handles sensitive security-related data. Pay special attention to PCI DSS v3. requirements 2, 4, and 12.

PropertyDescription
authenticationProviderID: String (read-only)Returns the authentication provider ID.
customer: Customer (read-only)Returns the customer object related to this profile.
email: StringReturns the customer's email address.
externalID: String (read-only)Returns the external ID.
lastLoginTime: Date (read-only)Returns the last login time of the customer through the external provider

This class does not have a constructor, so you cannot create it directly.

MethodDescription
getAuthenticationProviderID()Returns the authentication provider ID.
getCustomer()Returns the customer object related to this profile.
getEmail()Returns the customer's email address.
getExternalID()Returns the external ID.
getLastLoginTime()Returns the last login time of the customer through the external provider
setEmail(String)Sets the customer's email address.

assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values

authenticationProviderID: String (read-only)

Returns the authentication provider ID.


customer: Customer (read-only)

Returns the customer object related to this profile.


email: String

Returns the customer's email address.


externalID: String (read-only)

Returns the external ID.


lastLoginTime: Date (read-only)

Returns the last login time of the customer through the external provider


getAuthenticationProviderID(): String

Returns the authentication provider ID.

Returns:

  • the authentication provider ID.

getCustomer(): Customer

Returns the customer object related to this profile.

Returns:

  • customer object related to profile.

getEmail(): String

Returns the customer's email address.

Returns:

  • the customer's email address.

getExternalID(): String

Returns the external ID.

Returns:

  • the external ID.

getLastLoginTime(): Date

Returns the last login time of the customer through the external provider

Returns:

  • the time, when the customer was last logged in through this external provider

setEmail(email: String): void

Sets the customer's email address.

Parameters:

  • email - the customer's email address.