Overview  Package   Class  Tree  Serialized  Deprecated  Index  Help 

com.ibm.wps.portletservice.credentialvault.credentials
Class Credential

java.lang.Object
  extended bycom.ibm.wps.portletservice.credentialvault.credentials.Credential
All Implemented Interfaces:
Credential, java.io.Serializable
Direct Known Subclasses:
ActiveCredential, PassiveCredential

Deprecated. since 5.1.0.1, use the Java Portlet API and corresponding IBM portlet services 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:

  1. 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.
  2. 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).
  3. 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.  
 

Fields inherited from interface com.ibm.portal.portlet.service.credentialvault.credentials.Credential
KEY_CREDENTIAL_SECRET
 

Constructor Summary
Credential()
          Deprecated.  
java.util.Map)">Credential(java.util.Map config)
          Deprecated. Creates and initializes a new Credential Object.
 

Method Summary
protected  void checkInitialized()
          Deprecated.  
 int getSecretType()
          Deprecated. Returns credential's Secret Type in terms of the constants declared in com.ibm.wps.portletservice.credentialvault.CredentialVaultService
Should be overwritten by any child class that "overwrites" the secret attribute.
 void java.util.Map)">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
 

Field Detail

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. 

Constructor Detail

Credential

public Credential()
Deprecated. 

java.util.Map)">

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:
  1. The credential's client (usually the portlet) specifies backend application specific parameters (like e.g. 'login url')
  2. The portal's credential configuration store delivers credential slot specific parameters
  3. The actual credential store contributes the credential secret

Method Detail
java.util.Map)">

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:
java.util.Map)">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:
  1. The credential's client (usually the portlet) specifies backend application specific parameters (like e.g. 'login url')
  2. The portal's credential configuration store delivers credential slot specific parameters
  3. 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 credential's Secret Type in terms of the constants declared in com.ibm.wps.portletservice.credentialvault.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

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

checkInitialized

protected void checkInitialized()
Deprecated. 

Overview  Package   Class  Tree  Serialized  Deprecated  Index  Help 

 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.