Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Class SimpleSecurityRealmBase  view SimpleSecurityRealmBase download

  extended byorg.securityfilter.realm.SimpleSecurityRealmBase
All Implemented Interfaces:

public class SimpleSecurityRealmBase
extends java.lang.Object
implements SecurityRealmInterface

Security realm base class. This class insulates you from having to create or process Principal objects. You can implement a realm by overriding the two methods that neither take or return a Principal object and this class does the conversions for you.

$Revision: 1.7 $ $Date: 2003/01/06 00:17:25 $

Constructor Summary
Method Summary authenticate(java.lang.String username, java.lang.String password)
          Authenticate a user.
 boolean booleanAuthenticate(java.lang.String username, java.lang.String password)
          Authenticate a user.
 boolean isUserInRole( principal, java.lang.String rolename)
          Test for role membership.
 boolean isUserInRole(java.lang.String username, java.lang.String rolename)
          Test for role membership.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public SimpleSecurityRealmBase()
Method Detail


public boolean booleanAuthenticate(java.lang.String username,
                                   java.lang.String password)
Authenticate a user. Override this method in a subclass to avoid dealing with Principal objects.


public boolean isUserInRole(java.lang.String username,
                            java.lang.String rolename)
Test for role membership. Override this method in a subclass to avoid dealing with Principal objects.


public authenticate(java.lang.String username,
                                            java.lang.String password)
Authenticate a user.

Specified by:
authenticate in interface SecurityRealmInterface


public boolean isUserInRole( principal,
                            java.lang.String rolename)
Test for role membership. Use Principal.getName() to get the username from the principal object.

Specified by:
isUserInRole in interface SecurityRealmInterface