java.lang.Object
org.securityfilter.realm.SimpleSecurityRealmBase
- All Implemented Interfaces:
- SecurityRealmInterface
- 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.
- Version:
- $Revision: 1.7 $ $Date: 2003/01/06 00:17:25 $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleSecurityRealmBase
public SimpleSecurityRealmBase()
booleanAuthenticate
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.
isUserInRole
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.
authenticate
public java.security.Principal authenticate(java.lang.String username,
java.lang.String password)
- Authenticate a user.
- Specified by:
authenticate
in interface SecurityRealmInterface
isUserInRole
public boolean isUserInRole(java.security.Principal 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