org.jbpm.services.task.identity
Class JAASUserGroupCallbackImpl
java.lang.Object
org.jbpm.services.task.identity.JAASUserGroupCallbackImpl
- All Implemented Interfaces:
- org.kie.internal.task.api.UserGroupCallback
@Alternative
public class JAASUserGroupCallbackImpl
- extends Object
- implements org.kie.internal.task.api.UserGroupCallback
JAAS based implementation of user group callback dedicated when using LocalTaskService
in container such as JBoss AS. It relies on JACC api to collect information on currently
logged on user when querying for tasks.
JACC exposes following named context in PolicyContext:
javax.security.auth.Subject.container
This returns Subject
instance for currently authenticated user and next principals
will be examined to find instances of Group
and with given rolePrincipleName (by default Roles).
By default it works with JBoss Application Servers as it uses specific principal name to find the groups.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_PROPERTIES_NAME
protected static final String DEFAULT_PROPERTIES_NAME
- See Also:
- Constant Field Values
JAASUserGroupCallbackImpl
public JAASUserGroupCallbackImpl()
JAASUserGroupCallbackImpl
public JAASUserGroupCallbackImpl(String rolesPrincipleName)
getRolePrincipleName
public String getRolePrincipleName()
setRolePrincipleName
public void setRolePrincipleName(String rolePrincipleName)
existsUser
public boolean existsUser(String userId)
- Specified by:
existsUser
in interface org.kie.internal.task.api.UserGroupCallback
existsGroup
public boolean existsGroup(String groupId)
- Specified by:
existsGroup
in interface org.kie.internal.task.api.UserGroupCallback
getGroupsForUser
public List<String> getGroupsForUser(String userId,
List<String> groupIds,
List<String> allExistingGroupIds)
- Specified by:
getGroupsForUser
in interface org.kie.internal.task.api.UserGroupCallback
Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.