The Security Manager interface provides methods to retrieve credential values set in the Integration event. Methods include:
getCredential(credentialName)
null
getCredentials()
checkCredentialValue(credentialName, credentialValue)
true
false
Complete the following steps using the Logon Service you created in the Introduction to Logon Services tutorial.
Add the following code to the Integration event script of your Logon Service.
tables.CREDENTIAL.insertRow(); tables.CREDENTIAL.ID.value = "email"; tables.CREDENTIAL.VALUE.value = "joe.bloggs@example.com"; tables.CREDENTIAL.updateTable();
Create a form and create a field called email. Add the field to the page.
Create a Before Page script and add the following code:
fields.email.value = system.securityManager.getCredential("email");
Run the form and notice how the email field has been populated with the value of the email credential.