SwitchUser
Mon 01 January 2018Syntax
SwitchUser(UserID, Password, AuthToken , ExtAuthInfo)
Note: Password is not encrypted: it is passed as a string.
Description
Use the SwitchUser function to change the user ID of the current user logged onto the PeopleSoft system.
Note: SwitchUser changes the Portal user rather than the content specific user. This means it changes the user ID in all databases to which the user is connected.
Note: If you use SwitchUser with the AuthToken parameter, the local Integration Broker node must have a Password or Certificate Authentication option. If the local Integration Broker node authentication option is None , SwitchUser always fails and returns false.
The SwitchUser function might be used as follows. Suppose there is a special user ID in the system called REGIST. REGIST only has access to the self-registration component. The self-registration component has logic that asks the user a list of questions and information based on data in the database. Are you a customer, vendor, or employee? Enter your customer name. Enter other information related to this customer account (such as information only this customer knows or information this customer just received from a workflow email). After the program verifies the information, create a User ID for this customer. After the user ID is created, the program should take the user directly into their transaction without having to logoff, by using SwitchUser.
Parameters
|
Field or Control |
Definition |
|---|---|
| UserID |
Specify the User ID to be started. This parameter takes a string value. |
| Password |
Specify the Password for this User ID. This parameter takes a string value. Note: Password is not encrypted: it is passed as a string. |
| AuthToken |
Specify a single signon authentication token used to authenticate the user. If you are authenticating the user by Userid and password, specify a NULL value for this parameter, that is, two quotation marks with no blank space between them (""). If you specify a token, and the token is valid, SwitchUser switches to the User ID embedded in the token. All other parameters are ignored if a token is used. This parameter takes a string value. |
| ExtAuthInfo |
Specify binary data (encoded as a base64 string) used as additional input to authenticate the user. If your application doesn't use external authentication information, specify a NULL value for this parameter, that is, two quotation marks with no blank space between them (""). |
Returns
A Boolean value: True if user ID is switched successfully, False otherwise.