impersonate() Method
In SecurityService, use the impersonate() method to enable an admin account to act on the behalf of a user account.
This method is very useful if the user doesn't have a known password to be authenticated. This method logs in using the admin account privilege, then switches the owner of the session to the passed-in username. Therefore, bipSession token later is verified by the passed-in username. All further operations are performed through given username.
Signature
String impersonate(String adminUsername, String adminPassword,String username);
Parameters for impersonate() Method
Parameter | Description |
---|---|
String adminUserName |
The user name for a user with administration privileges |
String adminPassword |
The password for the administration user name. |
String username |
The username of the user account that's granted administrator privileges. |