Newer Version Available
HeadlessUserDiscoveryResponse Class
Contains methods to describe the result of headless user discovery using a handler that
implements the Auth.HeadlessUserDiscoveryHandler interface during the headless passwordless login flow.
Namespace
Usage
Use this class to return a user ID if headless user discovery was
successful, or return custom error messages if not.
HeadlessUserDiscoveryResponse Constructors
The following are constructors for HeadlessUserDiscoveryResponse.
HeadlessUserDiscoveryResponse(userIds, customErrorMessage)
Creates an instance of the Auth.HeadlessUserDiscoveryResponse class to describe the result of headless user
discovery based on data passed into the login_hint during the headless
passwordless login flow.
Signature
public HeadlessUserDiscoveryResponse(Set<Id> userIds, String customErrorMessage)
Parameters
- userIds
- Type: Set<Id>
- The user ID that's associated with the data passed in the login_hint parameter. If there are multiple users associated with the data, it can return multiple IDs, but headless user discovery fails.
- customErrorMessage
- Type: String
- A custom error message that's returned if headless user discovery fails.
HeadlessUserDiscoveryResponse Properties
The following are properties for HeadlessUserDiscoveryResponse.
customErrorMessage
A custom error message that's returned if headless user discovery fails. For example,
write custom logic in your headless user discovery handler to see if the user's email address is
verified. Then return a custom error message for when it isn't verified.
Signature
public String customErrorMessage {get; set;}
Property Value
Type: String