org.opentox.auth
Class CredentialsVerifier
java.lang.Object
org.restlet.security.Verifier
org.restlet.security.SecretVerifier
org.opentox.auth.CredentialsVerifier
public class CredentialsVerifier
- extends org.restlet.security.SecretVerifier
Verifies if some given credentials are valid performing a
database query.
- Author:
- OpenTox - http://www.opentox.org, Sopasakis Pantelis, Sarimveis Harry
Fields inherited from class org.restlet.security.Verifier |
RESULT_INVALID, RESULT_MISSING, RESULT_STALE, RESULT_UNSUPPORTED, RESULT_VALID |
Method Summary |
boolean |
verify(java.lang.String identifier,
char[] inputSecret)
Verify if a given pair of username and password are valid performing
a database query. |
Methods inherited from class org.restlet.security.SecretVerifier |
createUserPrincipal, verify |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
application
private OpenToxApplication application
authorizationLevel
private Priviledges authorizationLevel
CredentialsVerifier
public CredentialsVerifier(OpenToxApplication application)
- Initialize the CredentialsVerifier.
- Parameters:
application
-
CredentialsVerifier
public CredentialsVerifier(OpenToxApplication application,
Priviledges authorizationLevel)
- Verifies credentials only if their corresponding authorization level is
equal or greater to a specified level.
- Parameters:
application
- authorizationLevel
-
verify
public boolean verify(java.lang.String identifier,
char[] inputSecret)
- Verify if a given pair of username and password are valid performing
a database query. The given password is compared to a digest in the
database.
- Specified by:
verify
in class org.restlet.security.SecretVerifier
- Parameters:
identifier
- the username.inputSecret
- Character Array of the password/
- Returns:
- true if the user is authenticated and false if not.