SetAuthenticationResult

Mon 01 January 2018

Syntax

SetAuthenticationResult(AuthResult [, UserId] [,ResultDocument] [,PasswordExpired] [DaysLeftBeforeExpire])

Description

Use the SetAuthenticationResult function in signon PeopleCode to customize the authentication process. It enables the developer using signon PeopleCode to implement additional authentication mechanisms beyond the basic PeopleSoft ID and password authentication.

When PasswordExpired is True, it indicates the password is expired, the passwordexpired.html page is displayed during login when signon PeopleCode is enabled.

When DaysLeftBeforeExpire is greater than 0, and PasswordExpired is False, indicating that the password will expire in x days, the passwordwarning.html page is displayed during login when signon PeopleCode is enabled.

Note: If you set AuthResult to False, ResultDocument must be the text of an error message. This text is displayed on the signon screen.

Parameters

Field or Control

Definition

AuthResult

Specify whether the authentication is successful. This parameter takes a Boolean value. If True is used, the end user of the UserId specified on the Signon page is allowed access to the system.

When AuthResult is True, the customer is responsible for providing a logout to the end user. They will remain logged in until a logout command is issued from the user, or the session expires.

UserId

Specify the UserId of the user signing on. The default value is the UserId entered on the signon page. This parameter takes a string value. This is the value returned by %SignonUserId

ResultDocument

When ResultDocument is blank (""), this parameter value is ignored. Otherwise, specify a message to be displayed in the signonresultdoc.html file when AuthResult is True.

If AuthResult is False, the ResultDocument text value is displayed on the signon screen. If ResultDocument has a value, any values in PasswordExpired and DaysLeftBeforeExpire are ignored.

PasswordExpired

Specify if the user’s password has expired. The values are:

  • False (default) if the user's password hasn't expired.

  • True if the user's password has expired

If this value is specified as True, the user is allowed to log in, but is able to access only a limited portion of the system: just enough to change their expired password.

DaysLeftBeforeExpire

A numeric value indicating the number of days left before the password expires. If the value is greater than 0, a warning is displayed when Authorized is True and Expired is False.

Returns

A Boolean value: True if function completed successfully, False otherwise.