Package org.restlet.security
Class MemoryRealm.DefaultVerifier
- java.lang.Object
-
- org.restlet.security.SecretVerifier
-
- org.restlet.security.MemoryRealm.DefaultVerifier
-
- All Implemented Interfaces:
Verifier
- Enclosing class:
- MemoryRealm
private class MemoryRealm.DefaultVerifier extends SecretVerifier
Verifier based on the default security model. It looks up users in the mapped organizations.
-
-
Field Summary
-
Fields inherited from interface org.restlet.security.Verifier
RESULT_INVALID, RESULT_MISSING, RESULT_STALE, RESULT_UNKNOWN, RESULT_UNSUPPORTED, RESULT_VALID
-
-
Constructor Summary
Constructors Modifier Constructor Description privateDefaultVerifier()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected UsercreateUser(java.lang.String identifier, Request request, Response response)Called back to create a new user when valid credentials are provided.intverify(java.lang.String identifier, char[] secret)Verifies that the identifier/secret couple is valid.-
Methods inherited from class org.restlet.security.SecretVerifier
compare, getIdentifier, getSecret, verify
-
-
-
-
Method Detail
-
createUser
protected User createUser(java.lang.String identifier, Request request, Response response)
Description copied from class:SecretVerifierCalled back to create a new user when valid credentials are provided.- Overrides:
createUserin classSecretVerifier- Parameters:
identifier- The user identifier.request- The request handled.response- The response handled.- Returns:
- The
Userinstance created.
-
verify
public int verify(java.lang.String identifier, char[] secret)Description copied from class:SecretVerifierVerifies that the identifier/secret couple is valid. It throws an IllegalArgumentException in case the identifier is either null or does not identify a user.- Specified by:
verifyin classSecretVerifier- Parameters:
identifier- The user identifier to match.secret- The provided secret to verify.- Returns:
- Result of the verification based on the RESULT_* constants.
-
-