3.2 Configuring Macros for Messages and Actions

SSPR allows you to configure macros to generate messages in a particular format and perform required actions. If you require a particular message to be displayed in an email or when a user performs a particular action, then you can add the required macro where the information is a variable value. If you require any particular action to be automated for a specific user action, then configure macros for that particular action. You can also specify sub strings for LDAP values. Following is an example that displays the usage of macros:

Example 3-1 Dear, @LDAP:givenName@, Thank you for your activity today, @CurrentTime:EEE, MMM d, yyyy@. When the macros are activated the following message is displayed in the body of the email that is sent to specific user:

Dear, John, Thank you for your activity today, Wed, Jul 4, 2001. 

The list of macros that can be used to define the configuration value are as following:

Macros

Result

@LDAP:<name>@

LDAP value of <name>

@LDAP:name:length@

LDAP value of the user's LDAP attribute name. If the value is longer than length, then the value upto the specified length is considered.

@LDAP:name:length:padding@

LDAP value of the user's LDAP attribute name. If the value is longer than length, then the value upto the specified length is considered. If the value is shorter than length then, the specified length is added to the value till it has the specified length.

@LDAP:DN@

LDAP value of user’s Distinguished Name

@User:PwExpireTime@

Time when the user’s password will expire and the time is represented in default format, which is PWM format.

@User:PwExpireTime:<pattern>@

Time when the user’s password will expire and the time is represented in <pattern> format

@User:DaysUntilPwExpire@

Number of days that are remaining for the user’s password expiry

@User:ID@

User ID of the authenticated user

@User:Email@

Email address of the authenticated user

@User:Password@

Current password of the authenticated user

@InstanceID@

Instance ID of the application that is used

@CurrentTime@

Current time in a default format

@CurrentTime:<pattern>@

Current time in <pattern> format.

@SiteURL@

URL of the site that is used. For example, http://www.example.com/pwm

@SiteHost@

Hostname of the site that is used. For example, www.example.com

@RandomChar@

A single random character of upper & lower ASCII characters and digits.

@RandomChar:length@

Random characters, where length is the number of random characters that SSPR generates.

@RandomChar:length:characters@

Random characters, where length is the number of random characters that SSPR should generate and characters is the list of characters that will be used as random characters.

@Encode:type:[[value]]@

Encode a value using the specified type of encoding, where type is the type of encoding, and value is the value to encode. The value may include other macros. SSPR allows urlPath, urlParameter and base64.

To view the list of macros with some examples through Configuration Editor, click the open macro help and reference icon that is displayed on the top right corner of the Configuration Editor.