org.restlet.security

## Class LocalVerifier

- java.lang.Object
- - org.restlet.security.SecretVerifier
  - - org.restlet.security.LocalVerifier

All Implemented Interfaces:
  Verifier

Direct Known Subclasses:
  MapVerifier

    public abstract class LocalVerifier
    extends SecretVerifier

Verifier that can locally retrieve the secrets. This verifier assumes that the secret associated to an identifier can be retrieved, which isn't always possible or even desirable.

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 and Description
`LocalVerifier()`

### Method Summary

Methods
`abstract char[]` `getLocalSecret(java.lang.String identifier)` Returns the local secret associated to a given identifier.
`boolean` `verify(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`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### LocalVerifier

    public LocalVerifier()

### Method Detail

#### getLocalSecret

    public abstract char[] getLocalSecret(java.lang.String identifier)

Returns the local secret associated to a given identifier.

Parameters:
  `identifier` - The identifier to lookup.
Returns:
  The secret associated to the identifier or null.

#### verify

    public boolean verify(java.lang.String identifier,
                 char[] secret)

Description copied from class: `SecretVerifier`
Verifies 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:
  `verify` in class `SecretVerifier`
Parameters:
  `identifier` - The user identifier to match.
  `secret` - The provided secret to verify.
Returns:
  true if the identifier/secret couple is valid.