TokenUtility Class
Generate authentication tokens to access preference forms.
Call the generateToken() method to generate a single token for a specified Salesforce record ID:
Call the generateTokens() method to generate tokens in bulk when given a list of Salesforce record IDs:
The following are methods for TokenUtility.
-
generateToken(tokenValue, tokenType)
Returns the authentication token for the specified token value using the given token type.
-
Returns the authentication token for the specified token value using the default
standardtoken type. -
generateTokens(tokenValues, tokenType)
Returns the authentication tokens in the form of a map, where the map key is the input value to be tokenized and the map value is the corresponding token. The given token type is used to generate the tokens.
-
Returns the generated tokens in the form of a map. This method uses the default standard token type to generate the tokens.
Returns the authentication token for the specified token value using the given token type.
public static String generateToken(String tokenValue, pref_center.TokenType tokenType)
- tokenValue: Type: String The value passed to
LoadParameters.getRecordId()andSubmitParameters.getRecordId(). Identifies the entity that the preference form is acting on. - tokenType: Type: pref_center.TokenType Specifies the type of the value to be encrypted with authentication tokens.
Type: String
Returns the authentication token for the specified token value using the default standard token type.
public static String generateToken(String tokenValue)
- tokenValue: Type: String Identifies the entity that the preference form is acting on. The value passed to
LoadParameters.getRecordId()andSubmitParameters.getRecordId().
Type: String
Returns the authentication tokens in the form of a map, where the map key is the input value to be tokenized and the map value is the corresponding token. The given token type is used to generate the tokens.
public static Map<String,String> generateTokens(List<String> tokenValues, pref_center.TokenType tokenType)
- tokenValues: Type: List<String> The values passed to
LoadParameters.getRecordId()andSubmitParameters.getRecordId(). Identifies the entity that the preference form is acting on. Contains multiple values to be encrypted with authentication tokens. - tokenType: Type: pref_center.TokenType Specifies the type of the value to be encrypted with authentication tokens.
Returns the generated tokens in the form of a map. This method uses the default standard token type to generate the tokens.
public static Map<String,String> generateTokens(List<String> tokenValues)
- tokenValues: Type: List<String> The list of string values passed to
LoadParameters.getRecordId()andSubmitParameters.getRecordId().Contains multiple values to be encrypted with authentication tokens.
Type: Map<String,String>, where the map key is the input value to be tokenized and the map value is the corresponding token.