|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Authenticator
A set of methods that can be used to authenticate a user given an identity and some "secret& to verify that identity. For instance, a user name and a password are commonly used for this purpose.
In addition to verifying a user's identity, a mechanism is also provided to update a user's secret
Nested Class Summary | |
---|---|
static class |
Authenticator.AUTHENTICATION_RESULT
This enum provides the set of possible return values for the authenticate and updateSecret methods. |
Method Summary | |
---|---|
Authenticator.AUTHENTICATION_RESULT |
authenticate(java.lang.Object identity,
java.lang.Object secret)
Attempts to verify the user identified by identity using the supplied secret. |
java.lang.String |
getOperationalErrorDescription()
Provides feedback when an Authenticator specific operational error occurs. |
java.lang.String |
getOtherErrorDescription()
Provides feedback when a Authenticator specific error condition arises. |
Authenticator.AUTHENTICATION_RESULT |
updateSecret(java.lang.Object identity,
java.lang.Object oldSecret,
java.lang.Object newSecret)
Provides a mechanism for a user's secret to be updated. |
Method Detail |
---|
Authenticator.AUTHENTICATION_RESULT authenticate(java.lang.Object identity, java.lang.Object secret)
Attempts to verify the user identified by identity using the supplied secret.
If the supplied secret matches that known to this Authenticator, then the enum value SUCCESS should be returned. If authentication fails, the Authenticator can choose to provide specific feedback, such as the fact that an unknown identity was presented, at the Authenticator implementor's discretion. If specified feedback is not desired, the enum value FAILED should be returned. Implementors can indicate custom return values through the use of the OTHER_ERROR enum value. If OTHER_ERROR is returned, then the result the method getOtherErrorDescription should return a description of the error so that the user can be provided with feedback.
If an implementation specific error occurs, such as a failure to contact a specific database, then the enum value OPERATIONAL_ERROR should be returned, and the method getOperationalErrorDescription should return a description of the error so that the user can be provided with feedback.
identity
- an object used to identify a given individualsecret
- an object known/possessed by only the individual identified by identity
Authenticator.AUTHENTICATION_RESULT updateSecret(java.lang.Object identity, java.lang.Object oldSecret, java.lang.Object newSecret)
identity
- an object used to identify a given useroldSecret
- the user's current secretnewSecret
- the new secret to be used for the given user
java.lang.String getOtherErrorDescription()
java.lang.String getOperationalErrorDescription()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |