setCredential()

Stores a user ID and password in the credential vault slot with the given ID.

This function produces an error if the slot does not contain secrets that are userid or password types; or if the secret cannot be stored.

Syntax

portalLib.setCredential(
  slotId STRING in,
  userId STRING in,
  password STRING in)
slotId
A string value that contains the slot ID of the credential vault to be used.
userId
A string value that contains the user ID to be stored in the vault slot.
password
A string value that contains the password to be stored in the vault slot.

Example

slotid String = portalLib.getPreferenceValue("userSlot", null);
userid String = "portalUser";
password String = "userPasswd";
portalLib.setCredential(slotid, userid, password);

Feedback