Newer Version Available
TokenUtility Class
Namespace
Example
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:
TokenUtility Methods
The following are methods for TokenUtility.
generateToken(tokenValue, tokenType)
Signature
public static String generateToken(String tokenValue, pref_center.TokenType tokenType)
Parameters
- tokenValue
- Type: String
- The value passed to LoadParameters.getRecordId() and SubmitParameters.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.
Return Value
Type: String
generateToken(tokenValue)
Returns the authentication token for the specified token value using
the default standard token type.
Signature
public static String generateToken(String tokenValue)
Parameters
- tokenValue
- Type: String
- Identifies the entity that the preference form is acting on. The value passed to LoadParameters.getRecordId() and SubmitParameters.getRecordId().
Return Value
Type: String
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.
Signature
public static Map<String,String> generateTokens(List<String> tokenValues, pref_center.TokenType tokenType)
Parameters
- tokenValues
- Type: List<String>
- The values passed to LoadParameters.getRecordId() and SubmitParameters.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.