getCredential()

Retrieves the user ID and password that is stored in a credential vault slot. If the retrieval is successful, the retrieved values are stored in the userId and password output parameters, and the function returns a value of true. If the credential vault is accessible, but no secret is retrieved, userId and password will be set to null and getCredential() returns false. This is usually the result of attempting to access a vault slot whose secret has not been set.

This function produces an error if the Credential Vault is not accessible.

Syntax

portalLib.getCredential(
  slotID STRING in, 
  userId STRING? out,
  password STRING? out) 
returns (value BOOLEAN)
slotId
The system ID of the slot to be accessed.
userId
A nullable string variable where the retrieved user ID will be stored upon successful credential retrieval.
password
A nullable string variable where the retrieved password will be stored if credential retrieval succeeds.
value
A Boolean value that indicates whether a credential was successfully retrieved.

Example

uid String?;
pw String?;

succeeded boolean = portalLib.getCredential("myslot", uid, pw);

Feedback