Using the dominoIDVaultBean (Java - XPages managed) to access the Domino ID Vault

The dominoIDVaultBean is an object used to maintain the information needed to access the Domino® ID Vault.

Overview

The dominoIDVaultBean is an object that is automatically created, managed and discarded by the XPages runtime to maintain the information needed to access the Domino ID Vault. This object is automatically instantiated when a user creates a new session and discarded when the session completes. The XPages runtime uses the dominoIDVaultBean to access the ID Vault when encrypting and decrypting documents.

Note: This class is new with Release 9.0.1 FP8

Methods

The dominoIDVaultBean provides the following Java™ methods to maintain the information needed to access the Domino ID Vault.

  • getServerName - Obtains the name of the vault server.
  • setServerName - Sets the name of the vault server.
  • getUserName - Obtains the user name of the user requiring access to the ID Vault.
  • setUsername - Specifies the user name of the user requiring access to the ID Vault.
  • getUserPassword - Obtains the password of the user requiring access to the ID Vault.
  • setUserPassword - Sets the password of the user requiring access to the ID Vault.
  • getUserID - Gets a UserID object from the ID Vault.

Usage

The get and set methods are used to manage the properties required to access the Domino ID Vault, namely user name, password and vault server name. The getUserID method will return the UserID object based on the values associated with the access properties. The UserID object can be used to obtain the secret keys needed to perform encryption operations.

Examples

This code example shows the dominoIDVaultBean properties being set for a user and then the user’s id and secret keys being retrieved

dominoIDVaultBean.setUserName("Jane Doe/ACME");
dominoIDVaultBean.setUserPassword("BlueN0te");
dominoIDVaultBean.setServerName("BigIron/IBM");
var userId = dominoIDVaultBean.getUserID();
if (userId != null){
	print(userId.getEncryptionKeys().toString());

For more information, refer also to the UserID and ID Vault class reference information in the Java/Corba Classes section of the Domino Designer Basic User Guide (also installed with Domino Designer).