|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Authenticator
This interface defines the methods that needs to be implemented by a class to be able to use it for external authentication against another database or directory service.
Method Summary | |
---|---|
AuthenticationInformation |
authenticate(String login,
String password)
Authenticates a user. |
void |
init(String settings)
Initialises the object. |
boolean |
supportsExtraInformation()
Should return TRUE or FALSE depending on if the authentication server returns additional information about the user. |
Method Detail |
---|
void init(String settings) throws AuthenticationException
settings
string should be defined by the implementing class. It may for
example be the URL for a database connection,
the path to a properties file or simply the host name of the
directory service provider.
settings
- A string containing initialisation parameters
AuthenticationException
- If the parameters are invalidboolean supportsExtraInformation()
AuthenticationInformation
,
authenticate(String,String)
AuthenticationInformation authenticate(String login, String password) throws UnknownLoginException, InvalidPasswordException, AuthenticationException
AuthenticationInformation
object
should be returned. The only required information in this object is
the AuthenticationInformation.id
and
AuthenticationInformation.login
fields. The id
may or may not be the same as the login
, but must be a unique
string identifying the user.
If the authentication fails an exception should be thrown. Note! An
implementation may choose to throw a AuthenticationException
for all errors, even if it is an unknown user or invalid password.
login
- The login name for the userpassword
- The password for the user
AuthenticationInformation
object
UnknownLoginException
- This exception may be thrown if the
server doesn't know about the user. It is also possible for an
implmentation to throw an AuthenticationException
InvalidPasswordException
- This exception may be thrown if the
password is invalid. It is also possible for an implementation to throw
an AuthenticationException
AuthenticationException
- This exception is thrown if the
authentication fails
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |