@Deprecated public class SimpleAuthenticator extends Object implements Authenticator
Authenticator
interface that authenticates everyone as long as the login is the same
as the password. This class should of course never be used in a real
environment.Constructor and Description |
---|
SimpleAuthenticator()
Deprecated.
Create a new
SimpleAuthenticator object. |
Modifier and Type | Method and Description |
---|---|
AuthenticationInformation |
authenticate(String login,
String password)
Deprecated.
If login and password are equal the user is authenticated, otherwise an
InvalidPasswordException is thrown. |
void |
init(String settings)
Deprecated.
There is nothing to initialise.
|
boolean |
supportsExtraInformation()
Deprecated.
Always return FALSE.
|
public SimpleAuthenticator()
SimpleAuthenticator
object.public void init(String settings) throws AuthenticationException
init
in interface Authenticator
settings
- A string containing initialisation parametersAuthenticationException
- If the parameters are invalidpublic boolean supportsExtraInformation()
supportsExtraInformation
in interface Authenticator
AuthenticationInformation
,
Authenticator.authenticate(String,String)
public AuthenticationInformation authenticate(String login, String password) throws UnknownLoginException, InvalidPasswordException, AuthenticationException
InvalidPasswordException
is thrown.authenticate
in interface Authenticator
login
- The login name for the userpassword
- The password for the userAuthenticationInformation
objectUnknownLoginException
- 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