org.jboss.reliance.drools.core.security
Class RuleBasedIdentity
java.lang.Object
org.jboss.reliance.identity.Identity
org.jboss.reliance.drools.core.security.RuleBasedIdentity
- All Implemented Interfaces:
- RuleDependencyCheck
public class RuleBasedIdentity
- extends org.jboss.reliance.identity.Identity
- implements RuleDependencyCheck
Drools based identity.
- Author:
- Shane Bryzak, Ales Justin
| Fields inherited from class org.jboss.reliance.identity.Identity |
log, ROLES_GROUP |
| Methods inherited from class org.jboss.reliance.identity.Identity |
getDefaultCallbackHandler, getJaasConfigName, getLoginContext, getPassword, getPrincipal, getSubject, getUsername, hasRole, isCredentialsSet, logout, preAuthenticate, setConfiguration, setJaasConfigName, setPassword, setUsername |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RuleBasedIdentity
public RuleBasedIdentity()
create
public void create()
- Overrides:
create in class org.jboss.reliance.identity.Identity
postAuthenticate
protected void postAuthenticate()
- Overrides:
postAuthenticate in class org.jboss.reliance.identity.Identity
canResolve
public boolean canResolve(Object name,
Object action,
Object... arg)
- Description copied from interface:
RuleDependencyCheck
- Performs a check for the specified name and action
if they can be resolved.
- Specified by:
canResolve in interface RuleDependencyCheck
- Parameters:
name - Object The permission nameaction - Obejct The permission actionarg - Object Optional object parameter used to make a permission decision
- Returns:
- boolean true if the user has the specified permission
unAuthenticate
protected void unAuthenticate()
- Overrides:
unAuthenticate in class org.jboss.reliance.identity.Identity
addRole
public boolean addRole(String role)
- Overrides:
addRole in class org.jboss.reliance.identity.Identity
removeRole
public void removeRole(String role)
- Overrides:
removeRole in class org.jboss.reliance.identity.Identity
getSecurityContext
public org.drools.StatefulSession getSecurityContext()
- Get the statefull session.
- Returns:
- statefull session
setSecurityContext
public void setSecurityContext(org.drools.StatefulSession securityContext)
- Set statefull session.
- Parameters:
securityContext - the session
setSecurityRules
public void setSecurityRules(org.drools.RuleBase securityRules)
- Set the rule base.
- Parameters:
securityRules - the rule base instance
login
public boolean login()
- Overrides:
login in class org.jboss.reliance.identity.Identity
quietLogin
public void quietLogin()
- Overrides:
quietLogin in class org.jboss.reliance.identity.Identity
authenticate
public void authenticate()
throws LoginException
- Overrides:
authenticate in class org.jboss.reliance.identity.Identity
- Throws:
LoginException
authenticate
public void authenticate(LoginContext loginContext)
throws LoginException
- Overrides:
authenticate in class org.jboss.reliance.identity.Identity
- Throws:
LoginException
isLoggedIn
public boolean isLoggedIn()
- Overrides:
isLoggedIn in class org.jboss.reliance.identity.Identity
isLoggedIn
public boolean isLoggedIn(boolean attemptLogin)
- Overrides:
isLoggedIn in class org.jboss.reliance.identity.Identity
Copyright © 2008 JBoss Inc.. All Rights Reserved.