com.ibm.wps.portletservice.credentialvault.credentials
Class Credential
java.lang.Object
com.ibm.wps.portletservice.credentialvault.credentials.Credential
- All Implemented Interfaces:
- Credential, java.io.Serializable
- Direct Known Subclasses:
- ActiveCredential, PassiveCredential
Deprecated. since 6.0. Support of the IBM portlet API may be removed in a future
release of WebSphere Portal. Use of the Java Portlet API (javax.portlet)
is recommended instead.
public abstract class Credential
- extends java.lang.Object
- implements java.io.Serializable, Credential
Abstract base class for all credential classes. As such it is the WP Credential "interface".
The different terms need to be distinguished when talking of (active) credentials:
- A Credential Type is an implementation of an abstract credential class that has
authentication methods specialized to perform a certain kind of authentication (e.g. form-based web authentication).
Credential Types will be defined and delivered by the portal framework. They are registered in a credential registry and can be retrieved through
a method on the CredentialVaultService.
- A Credential Instance is an Credential Type that has been configured to work with one specific backend (application),
or simply speaking:
Credential Instance = Credential Type + configuration data
(e.g. the mycompany-webmail-credential is a form-based web authentication credential plus information about the postURL,
userid attribute name and password attribute name).
- A Concrete Credential Object is a Java object of a Credential Instance of the kind that is passed between
vault (service) and portlet. This credential object is user specific as it carries the user secret with it.
Note: All concrete subclasses must provide a no-argument constructor. The credentials are initialized
by the init
method.
- Since:
- WP 5.1.0.1
- See Also:
- Serialized Form
Field Summary |
protected static java.lang.String
| LOGGER_NAME
Deprecated. Name of the logger that all WP credentials should use for logging.
|
protected CredentialSecret
| secret
Deprecated.
|
Constructor Summary |
Credential()
Deprecated.
|
Credential(java.util.Map config)
Deprecated. Creates and initializes a new Credential Object.
|
Method Summary |
protected void
| checkInitialized()
Deprecated.
|
int
| getSecretType()
Deprecated. Returns the credential's Secret Type in terms of the constants declared in
CredentialVaultService
Should be overwritten by any child class that "overwrites" the secret attribute.
|
void
| init(java.util.Map config)
Deprecated. Initializes the credential with the specified configuration.
|
boolean
| isActive()
Deprecated. Returns whether a credential is active or passive.
Should be overwritten by any child classes.
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
|
LOGGER_NAME
protected static final java.lang.String LOGGER_NAME
- Deprecated.
- Name of the logger that all WP credentials should use for logging.
- See Also:
- Constant Field Values
secret
protected CredentialSecret secret
- Deprecated.
Credential
public Credential()
- Deprecated.
Credential
public Credential(java.util.Map config)
throws java.lang.InstantiationException
- Deprecated.
- Creates and initializes a new Credential Object.
- Parameters:
- config - Configuration data that is needed to initialize the credential.
What parameters are needed is specific to the actual credential type.
Generally, this data is collected from three different sources:
- The credential's client (usually the portlet) specifies backend application specific parameters (like e.g. 'login url')
- The portal's credential configuration store delivers credential slot specific parameters
- The actual credential store contributes the credential secret
- Throws:
- java.lang.InstantiationException
init
public void init(java.util.Map config)
throws CredentialVaultException
- Deprecated.
- Initializes the credential with the specified configuration.
Subclasses need to override this method to retrieve the necessary configuration information (e.g. the secret)
- Specified by:
- init in interface Credential
- Parameters:
- config - Configuration data that is needed to initialize the credential.
What parameters are needed is specific to the actual credential type.
Generally, this data is collected from three different sources:
- The credential's client (usually the portlet) specifies backend application specific parameters (like e.g. 'login url')
- The portal's credential configuration store delivers credential slot specific parameters
- The actual credential store contributes the credential secret
- Throws:
- CredentialVaultException - If any mandatory parameter is missing or has a wrong object type as value.
getSecretType
public int getSecretType()
- Deprecated.
- Returns the credential's Secret Type in terms of the constants declared in
CredentialVaultService
Should be overwritten by any child class that "overwrites" the secret attribute.
- Specified by:
- getSecretType in interface Credential
- Returns:
- int
Credential Secret Type identifier
- See Also:
- CredentialVaultService
isActive
public boolean isActive()
- Deprecated.
- Returns whether a credential is active or passive.
Should be overwritten by any child classes.
- Specified by:
- isActive in interface Credential
- Returns:
- boolean
true if credential is active, false otherwise
- See Also:
- PassiveCredential,
ActiveCredential
checkInitialized
protected void checkInitialized()
- Deprecated.