UserData Class
Namespace
Usage
For more information about using this class with the Auth.RegistrationHandler interface, see Storing User Information and Getting Access Tokens in the RegistrationHandler Interface documentation.
For more information about using this class as an Apex-defined variable in a user registration flow, see Example: Authentication Provider Registration Handler Flow in Salesforce Help
UserData Constructors
The following are constructors for UserData.
UserData(identifier, firstName, lastName, fullName, email, link, userName, locale, provider, siteLoginUrl, attributeMap)
Signature
public UserData(String identifier, String firstName, String lastName, String fullName, String email, String link, String userName, String locale, String provider, String siteLoginUrl, Map<String,String> attributeMap)
Parameters
- identifier
- Type: String
- An identifier from the third party for the authenticated user, such as the Facebook user number or the Salesforce user ID.
- firstName
- Type: String
- The first name of the authenticated user, according to the third party.
- lastName
- Type: String
- The last name of the authenticated user, according to the third party.
- fullName
- Type: String
- The full name of the authenticated user, according to the third party.
- Type: String
- The email address of the authenticated user, according to the third party.
- link
- Type: String
- A stable link for the authenticated user such as https://www.facebook.com/MyUsername.
- userName
- Type: String
- The username of the authenticated user in the third party.
- locale
- Type: String
- The standard locale string for the authenticated user.
- provider
- Type: String
- The service used to log in, such as Facebook or Janrain.
- siteLoginUrl
- Type: String
- The site login page URL passed in if used with a site; null otherwise.
- attributeMap
- Type: Map<String, String>
- A map of data from the third party, in case the handler has to access non-standard values. For example, when using Janrain as a provider, the fields Janrain returns in its accessCredentials dictionary are placed into the attributeMap. These fields vary by provider.
UserData(identifier, firstName, lastName, fullName, email, link, username, locale, provider, siteLoginUrl, attributeMap, idToken, userInfoJSONString)
Signature
public UserData(String identifier, String firstName, String lastName, String fullName, String email, String link, String username, String locale, String provider, String siteLoginUrl, Map<String,String> attributeMap, String idToken, String userInfoJSONString)
Parameters
- identifier
- Type: String
- An identifier from the third party for the authenticated user, such as the Facebook user number or the Salesforce user ID.
- firstName
- Type: String
- The first name of the authenticated user, according to the third party.
- lastName
- Type: String
- The last name of the authenticated user, according to the third party.
- fullName
- Type: String
- The full name of the authenticated user, according to the third party.
- Type: String
- The email address of the authenticated user, according to the third party.
- link
- Type: String
- A stable link for the authenticated user such as https://www.facebook.com/MyUsername.
- username
- Type: String
- The username of the authenticated user in the third party.
- locale
- Type: String
- The standard locale string for the authenticated user.
- provider
- Type: String
- The service used to log in, such as Facebook or Janrain.
- siteLoginUrl
- Type: String
- The site login page URL passed in if used with a site; null otherwise.
- attributeMap
- Type: Map<String, String>
- A map of data from the third party, in case the handler has to access non-standard values. For example, when using Janrain as a provider, the fields Janrain returns in its accessCredentials dictionary are placed into the attributeMap. These fields vary by provider.
- idToken
- Type: String
- If provided by the third party, the ID token, formatted as an encoded JWT. The ID token contains claims with information about the authenticated user.
- userInfoJSONString
- Type: String
- If provided by the third party, the user info response, formatted as a JSON object that has been serialized into a string.
UserData Properties
The following are properties for UserData.
identifier
Signature
public String identifier {get; set;}
Property Value
Type: String
attributeMap
Signature
public Map<String, String> attributeMap {get; set;}
idToken
Signature
public String idToken {get; set;}
Property Value
Type: String
userInfoJSONString
Signature
public String userInfoJSONString {get; set;}
Property Value
Type: String
idTokenJSONString
Signature
public String idTokenJSONString {get; set;}
Property Value
Type: String