java.lang.Object
org.securityfilter.realm.SimpleSecurityRealmBase
org.securityfilter.example.realm.TrivialSecurityRealm
- All Implemented Interfaces:
- org.securityfilter.realm.SecurityRealmInterface
- public class TrivialSecurityRealm
- extends org.securityfilter.realm.SimpleSecurityRealmBase
Trivial implementation of the SecurityRealmInterface.
There is one user: username is 'username', password is 'password'
And this user is in one role: 'inthisrole'
- Version:
- $Revision: 1.3 $ $Date: 2003/10/25 10:49:04 $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
exampleProperty
private java.lang.String exampleProperty
TrivialSecurityRealm
public TrivialSecurityRealm()
booleanAuthenticate
public boolean booleanAuthenticate(java.lang.String username,
java.lang.String password)
- Authenticate a user.
Implement this method in a subclass to avoid dealing with Principal objects.
isUserInRole
public boolean isUserInRole(java.lang.String username,
java.lang.String role)
- Test for role membership.
Implement this method in a subclass to avoid dealing with Principal objects.
setExampleProperty
public void setExampleProperty(java.lang.String value)
- Setter for exampleProperty to deomonstrate setting realm properties from config file.
This has no effect other than printing a message when the property is set.
getExampleProperty
public java.lang.String getExampleProperty()
- Getter for exampleProperty.