@UserId (JavaScript)

Returns the user ID object for a given user in the ID Vault.

Defined in

@Functions (JavaScript)

Syntax

@UserID(vaultServer:string, userPassword:string, userName:string) : UserID
@UserID() : UserID
Parameter Description
vaultServer The name of the server running the ID Vault. If no value is provided then the current server name (i.e., the name of the Domino server on which the app is running) will be applied by default.
userPassword The ID Vault password for the user name provided. If no value is provided then XPages will attempt to obtain and use the basic authorization password for the currently logged-in user. If another authentication mechanism is in place on the server, like SAML or SPNEGO, then this default value will not function correctly.
userName The name of the user whose id will be searched for secret keys. If no value is provided then the current user’s name will be applied by default.
Return value Description
UserID The UserID object stored in the ID Vault

Examples

The following example is an example of @UserID() being called with three explicit parameter values. The UserID object representing Jane Doe’s user id on ID Vault server “BigIron/Acme" will be returned, assuming the password provided is correct.

@UserID("BigIron/Acme", "T0pS3cr3t", "Jane Doe/Acme");

The following example shows @UserID() being called just the ID Vault server name. The user is therefore assumed to be the currently logged in user and the basic auth password is used – if appropriate.

@UserID("BigIron/Acme");

For more information, refer also to the UserID class in the Java classes topics found in the Basic User Guide.