|
IBM WebSphereTM eXtreme Scale, Release 8.6 API Specification |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CredentialGenerator
This plugin is used to get a Credential representing this client. It is a
factory for the Credential
object.
One example implementation is to return a Credential
object
containing a user ID and password pair. The implementation of the Credential
generated by an implementation of this class must to be understood by the
server's Authenticator
plugin.
An implementation class of this interface should have a default constructor.
Users can set the implementation
class name (credentialGeneratorClass) in the client security configuration property
file. The client runtime constructs an object of this implementation class
and calls getCredential() to get the Credential
to connect to
an ObjectGrid cluster.
Users can also specify the addtional properties for this factory using the
credentialGeneratorProps property in the client security configuration property file.
These properties will be passed to this
factory by calling the setProperties(String)
method. This way,
you can customize the CredentialGenerator factory.
Users can also set CredentialGenerator programmatically by calling
ClientSecurityCinfiguration.setCredentialGenerator(CredentialGenerator) method.
For example, you can have the following settings in the client security configuration
property file:
- credentialGeneratorClass=com.myco.CredGenFactory
- credentialGeneratorProps=user1 password1
A String "user1 password1" is passed to the setProperties(String)
method, with the "user1" indicating the user name, and "password1" indicating the password.
ObjectGrid provides two built-in implementations for this interface:
- com.ibm.websphere.objectgrid.security.plugins.builtins.UserPasswordCredentialGenerator:
A credential generator generating a UserPasswordCredential containing a user ID and password pair.
- com.ibm.websphere.objectgrid.security.plugins.builtins.WSTokenCredentialGenerator:
A credential generator generating a WSTokenCredential containing WebSphere Application Server
specific authentication and authorization tokens.
The relationship between CredentialGenerator and Credential can be one to one
relationship or one to many relationship. For example. the UserPasswordCredentialGenerator
has a one to one relationship with UserPasswordCredential, but the WSTokenCredentialGenerator
has a one to many relationship with WSTokenCredential because it could generate
different WSTokenCredential based on what Subject is associated with the current
thread.
Refer to the respective JavaDoc for more details.
- Since:
- WAS XD 6.0.1, XC10
- See Also:
Authenticator
,
ClientSecurityConfiguration.setCredentialGenerator(CredentialGenerator)
,
Credential
,
ObjectGrid.getSession(CredentialGenerator)
Method Summary
Credential
getCredential()
Gets a Credential
which represents the client.
void
setProperties(String properties)
Set the user defined properties to the factory.
Method Detail
getCredential
Credential getCredential()
throws CannotGenerateCredentialException
- Gets a
Credential
which represents the client.
- Returns:
- the Credential representing the client
- Throws:
CannotGenerateCredentialException
- if a failure occurs when
generating the Credential for the client.- See Also:
Credential
setProperties
void setProperties(String properties)
Set the user defined properties to the factory.
This method is used to set CredentialGenerator properties
to the object. These properties can be set using the credentialGeneratorProps
property in the client security configuration property file.
This way, you can customize your factory.
- Parameters:
properties
- user defined properties
Overview
Package
Class
Tree
Serialized
Deprecated
Index
Help
IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
© Copyright International Business Machines Corp 2005,2012. All rights reserved.