public abstract class CredentialGenerator
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
CredentialGenerator.ClassCode
Enumeration for various
CredentialGenerator implementations. |
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Properties |
javaProperties
A set of properties that should be added to the java system properties before using the
authentication module.
|
| Constructor and Description |
|---|
CredentialGenerator() |
| Modifier and Type | Method and Description |
|---|---|
abstract CredentialGenerator.ClassCode |
classCode()
The
CredentialGenerator.ClassCode of this particular implementation. |
static CredentialGenerator |
create(CredentialGenerator.ClassCode classCode)
A factory method to create a new instance of an
CredentialGenerator for the given
CredentialGenerator.ClassCode. |
abstract java.lang.String |
getAuthenticator()
The name of the
Authenticator factory function that should be used in conjunction with
the credentials generated by this generator. |
abstract java.lang.String |
getAuthInit()
The name of the
AuthInitialize factory function that should be used in conjunction with
the credentials generated by this generator. |
abstract java.util.Properties |
getInvalidCredentials(int index)
Get a set of invalid credentials generated using the given index.
|
java.util.Properties |
getJavaProperties() |
java.util.Properties |
getSystemProperties() |
abstract java.util.Properties |
getValidCredentials(int index)
Get a set of valid credentials generated using the given index.
|
abstract java.util.Properties |
getValidCredentials(java.security.Principal principal)
Get a set of valid credentials for the given
Principal. |
void |
init()
Initialize the credential generator.
|
protected abstract java.util.Properties |
initialize()
Initialize the credential generator.
|
protected java.util.Properties javaProperties
public static CredentialGenerator create(CredentialGenerator.ClassCode classCode)
CredentialGenerator for the given
CredentialGenerator.ClassCode. Caller is supposed to invoke init() immediately
after obtaining the instance.classCode - the ClassCode of the CredentialGenerator implementationCredentialGenerator for the given class codepublic void init()
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException - when there is a problem during initializationpublic java.util.Properties getSystemProperties()
public java.util.Properties getJavaProperties()
public abstract CredentialGenerator.ClassCode classCode()
CredentialGenerator.ClassCode of this particular implementation.ClassCodepublic abstract java.lang.String getAuthInit()
AuthInitialize factory function that should be used in conjunction with
the credentials generated by this generator.AuthInitialize factory functionpublic abstract java.lang.String getAuthenticator()
Authenticator factory function that should be used in conjunction with
the credentials generated by this generator.Authenticator factory functionpublic abstract java.util.Properties getValidCredentials(int index)
public abstract java.util.Properties getValidCredentials(java.security.Principal principal)
Principal.Principal or null if none possible.public abstract java.util.Properties getInvalidCredentials(int index)
protected abstract java.util.Properties initialize()
throws java.lang.IllegalArgumentException
init()
method for convenience of implementations so that they do not need to store in
systemProperties. The latter is convenient for the users who do not need to store
these properties rather can obtain it later by invoking getSystemProperties()
Required to be implemented by concrete classes that implement this abstract class.
java.lang.IllegalArgumentException - when there is a problem during initialization