Previous Topic: getEEMArtifactTokenForUserNext Topic: getEEMCredentialsTokenForUser


getEEMCredentialsToken

The getEEMCredentialsToken function generates a CA EEM credential token, typically for multiple uses. The certificateFilePath argument expects a relative path (File Path) of the certificate file. This file is uploaded using Manage User Resources within the Configuration tab.

In the case where FIPS is not enabled, the second argument is the certificate password. This password is used as a String for the certificate referred within the first argument (certificateFilePath).

In the case where FIPS support is enabled within CA EEM, the second argument is KeyFilePath. KeyFilePath is the relative path of the key file. This file is uploaded to CA Process Automation using Manage User Resources.

Syntax

getEEMCredentialsToken (certificateFilePath, {certificatePassword | KeyFilePath})

Arguments

certificateFilePath

The relative path of the certificate file.

certificatePassword (String) | KeyFilePath (String)

One of the following arguments:

Return Value

CA EEM artifact token (String)

Example

Before you write the code, first verify if CA EEM is FIPS-enabled or not by using the isFIPSMode () function, so you can pass certificateFilePath, certificatePassword, or certificatepath and KeyFilePath.

For example:

If (isFIPSMode ().equals(‘true’)){
Process.credentialToken = getEEMCredentialsToken("/mycerts/upload/pam.cer", "/mycerts/keys/pam.key")
} else {
Process.credentialToken = getEEMCredentialsToken("/mycerts/pam.12", "mypassword")
}