|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.core.authentication.SimpleAuthenticator
public class SimpleAuthenticator
This class is an example implementation of the 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 Summary | |
---|---|
SimpleAuthenticator()
Create a new SimpleAuthenticator object. |
Method Summary | |
---|---|
AuthenticationInformation |
authenticate(String login,
String password)
If login and password are equal the user is authenticated, otherwise an InvalidPasswordException is thrown. |
void |
init(String settings)
There is nothing to initialise. |
boolean |
supportsExtraInformation()
Always return FALSE. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleAuthenticator()
SimpleAuthenticator
object.
Method Detail |
---|
public void init(String settings) throws AuthenticationException
init
in interface Authenticator
settings
- A string containing initialisation parameters
AuthenticationException
- 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 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 |