The credential vault (ALI 6.0 and above) provides a central repository that securely stores and manages all credentials. Portlets that need login information to access a back-end application can securely retrieve the appropriate user credentials from a central location. Users enter their credentials once in their account settings and have seamless access to every application they interact with throughout the portal session.
To use the credential vault, there must be a Lockbox in the portal associated with the authentication source. To create or configure a Lockbox, go to portal administration and click
. For details, see the portal online help. To configure the credential vault for use with your portlet, three steps are required:// get an ICredentialProvider instance from IPortletContext IPortletContext portletContext = PortletContextFactory.createPortletContext(req, resp); ICredentialProvider cProvider = CredentialManager.getProviderInstance(req); // set the private key used to decrypt the password cProvider.setPrivateKey(rsaPrivateKeyString); // get the username and password String username = cProvider.getUsername(); String password = cProvider.getPassword();.NET
// get an ICredentialProvider instance from IPortletContext IPortletContext portletContext = PortletContextFactory.CreatePortletContext(req, resp); ICredentialProvider cProvider = portletContext.GetCredentialProvider(); // set the private key used to decrypt the password cProvider.SetPrivateKey(rsaPrivateKeyString); // get the username and password String username = cProvider.GetUsername(); String password = cProvider.GetPassword();