winstone.realm
Class ArgumentsRealm

java.lang.Object
  extended by winstone.realm.ArgumentsRealm
All Implemented Interfaces:
AuthenticationRealm

public class ArgumentsRealm
extends java.lang.Object
implements AuthenticationRealm

Base class for authentication realms. Subclasses provide the source of authentication roles, usernames, passwords, etc, and when asked for validation respond with a role if valid, or null otherwise.

Version:
$Id: ArgumentsRealm.java,v 1.4 2007/06/01 15:55:41 rickknowles Exp $
Author:
mailto: Rick Knowles

Constructor Summary
ArgumentsRealm(java.util.Set rolesAllowed, java.util.Map args)
          Constructor - this sets up an authentication realm, using the arguments supplied on the command line as a source of userNames/passwords/roles.
 
Method Summary
 AuthenticationPrincipal authenticateByUsernamePassword(java.lang.String userName, java.lang.String password)
          Authenticate the user - do we know them ? Return a principal once we know them
 AuthenticationPrincipal retrieveUser(java.lang.String userName)
          Retrieve an authenticated user
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArgumentsRealm

public ArgumentsRealm(java.util.Set rolesAllowed,
                      java.util.Map args)
Constructor - this sets up an authentication realm, using the arguments supplied on the command line as a source of userNames/passwords/roles.

Method Detail

authenticateByUsernamePassword

public AuthenticationPrincipal authenticateByUsernamePassword(java.lang.String userName,
                                                              java.lang.String password)
Authenticate the user - do we know them ? Return a principal once we know them

Specified by:
authenticateByUsernamePassword in interface AuthenticationRealm

retrieveUser

public AuthenticationPrincipal retrieveUser(java.lang.String userName)
Retrieve an authenticated user

Specified by:
retrieveUser in interface AuthenticationRealm


Copyright © 2013. All Rights Reserved.