net.larsan.norna.service.user
Class Indirection

java.lang.Object
  |
  +--net.larsan.norna.service.user.Indirection
Direct Known Subclasses:
NullIndirection

public abstract class Indirection
extends java.lang.Object

An indirection is a base class for indirective password verificators. Indirections should only be created by factories to prevent password snooping.

Version:
Alpha-0.2 / 2002-10-06 21:37
Author:
Lars J. Nilsson

Field Summary
protected  char[] credentials
           
protected  java.util.Map options
           
 
Constructor Summary
Indirection()
           
 
Method Summary
 void clearCredentials()
          Clear credentials from this object.
abstract  java.lang.String getID()
          Get indirection id.
abstract  boolean matches(char[] pass)
          Check if a given credential input matches a password according to the current indirection.
 void setCredentials(char[] cred)
          Set credentials this indirection should match agains.
 void setOptions(java.util.Map options)
          Set options for this indirection to use.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

options

protected java.util.Map options

credentials

protected char[] credentials
Constructor Detail

Indirection

public Indirection()
Method Detail

setOptions

public void setOptions(java.util.Map options)
Set options for this indirection to use.

Parameters:
options - Indirection options

setCredentials

public void setCredentials(char[] cred)
Set credentials this indirection should match agains.

Parameters:
cred - Input credentials.

clearCredentials

public void clearCredentials()
Clear credentials from this object.


matches

public abstract boolean matches(char[] pass)
Check if a given credential input matches a password according to the current indirection.

Parameters:
pass - Clear-text password
Returns:
true If the password indirectly matches the credentials

getID

public abstract java.lang.String getID()
Get indirection id.

Returns:
The Indirection id.