net.larsan.urd.service.user.jaas
Class UserRegistry

java.lang.Object
  |
  +--net.larsan.urd.service.user.jaas.UserRegistry

public class UserRegistry
extends java.lang.Object

A simple user registry for the flat-file Urd user login. This class parses an XML file and keeps a record of all users.

This class checks changes in the underlying file and caches users as long as the file is not changed.

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

Method Summary
static UserRegistry getInstance(java.io.File file)
          Get a registry instance.
 java.security.Principal getUser(java.lang.String name, Indirection ind)
          Get a user principal.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static UserRegistry getInstance(java.io.File file)
Get a registry instance.

Returns:
A registry instance, or null if the registry cannot be created

getUser

public java.security.Principal getUser(java.lang.String name,
                                       Indirection ind)
                                throws NoSuchUserException,
                                       AuthenticationFailedException
Get a user principal.

Parameters:
name - User name
Returns:
A principal for the user
Throws:
AuthenticationFailedException - If the pass is wrong
NoSuchUserException - If the user does not exist