Package org.restlet.security
Class MapVerifier
- java.lang.Object
 - 
- org.restlet.security.SecretVerifier
 - 
- org.restlet.security.LocalVerifier
 - 
- org.restlet.security.MapVerifier
 
 
 
 
- 
- All Implemented Interfaces:
 Verifier
public class MapVerifier extends LocalVerifier
Verifier that stores its local secrets in a map indexed by the identifier. Note that this verifier isn't very secure by itself.- Author:
 - Jerome Louvel
 
 
- 
- 
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 Constructor Description MapVerifier()Constructor.MapVerifier(java.util.concurrent.ConcurrentMap<java.lang.String,char[]> localSecrets)Constructor. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description char[]getLocalSecret(java.lang.String identifier)Returns the local secret associated to a given identifier.java.util.concurrent.ConcurrentMap<java.lang.String,char[]>getLocalSecrets()Returns the map of local secrets.voidsetLocalSecrets(java.util.Map<java.lang.String,char[]> localSecrets)Sets the modifiable map of local secrets.- 
Methods inherited from class org.restlet.security.LocalVerifier
verify 
- 
Methods inherited from class org.restlet.security.SecretVerifier
compare, createUser, getIdentifier, getSecret, verify 
 - 
 
 - 
 
- 
- 
Method Detail
- 
getLocalSecret
public char[] getLocalSecret(java.lang.String identifier)
Description copied from class:LocalVerifierReturns the local secret associated to a given identifier.- Specified by:
 getLocalSecretin classLocalVerifier- Parameters:
 identifier- The identifier to lookup.- Returns:
 - The secret associated to the identifier or null.
 
 
- 
getLocalSecrets
public java.util.concurrent.ConcurrentMap<java.lang.String,char[]> getLocalSecrets()
Returns the map of local secrets.- Returns:
 - The map of local secrets.
 
 
- 
setLocalSecrets
public void setLocalSecrets(java.util.Map<java.lang.String,char[]> localSecrets)
Sets the modifiable map of local secrets. This method clears the current map and puts all entries in the parameter map.- Parameters:
 localSecrets- A map of local secrets.
 
 - 
 
 -