public static UserGroupCallback getUserGroupCallback() { UserGroupCallback callback = new MvelUserGroupCallbackImpl(true); if ("ldap".equalsIgnoreCase(USER_CALLBACK_IMPL)) { callback = new LDAPUserGroupCallbackImpl(true); } else if ("db".equalsIgnoreCase(USER_CALLBACK_IMPL)) { callback = new DBUserGroupCallbackImpl(true); } else if ("mvel".equalsIgnoreCase(USER_CALLBACK_IMPL)) { callback = new MvelUserGroupCallbackImpl(true); } else if ("props".equalsIgnoreCase(USER_CALLBACK_IMPL)) { callback = new JBossUserGroupCallbackImpl(true); } else if ("jaas".equalsIgnoreCase(USER_CALLBACK_IMPL)) { callback = new JAASUserGroupCallbackImpl(true); } else if ("custom".equalsIgnoreCase(USER_CALLBACK_IMPL)) { try { callback = (UserGroupCallback) Class.forName(CUSTOM_USER_CALLBACK_IMPL).newInstance(); } catch (Exception e) { throw new RuntimeException("Unable to create instance of custom user group callback impl", e); } } return callback; }
public List<String> getGroupsForUser(String userId) { List<String> roles = new ArrayList<String>(); try { Subject subject = getSubjectFromContainer();
public JAASUserGroupCallbackImpl(boolean activate) { // use default JBoss AS role principle name this("Roles"); String propertiesLocation = System.getProperty("jbpm.usergroup.callback.properties"); Properties config = readProperties(propertiesLocation, DEFAULT_PROPERTIES_NAME); if (config != null) { this.rolePrincipleName = config.getProperty("jaas.role.principle.name", "Roles"); } }
JAASUserGroupCallbackImpl.addExternalUserGroupAdapter(new JMSUserGroupAdapter());
public static UserGroupCallback getUserGroupCallback() { UserGroupCallback callback = new MvelUserGroupCallbackImpl(true); if ("ldap".equalsIgnoreCase(USER_CALLBACK_IMPL)) { callback = new LDAPUserGroupCallbackImpl(true); } else if ("db".equalsIgnoreCase(USER_CALLBACK_IMPL)) { callback = new DBUserGroupCallbackImpl(true); } else if ("mvel".equalsIgnoreCase(USER_CALLBACK_IMPL)) { callback = new MvelUserGroupCallbackImpl(true); } else if ("props".equalsIgnoreCase(USER_CALLBACK_IMPL)) { callback = new JBossUserGroupCallbackImpl(true); } else if ("jaas".equalsIgnoreCase(USER_CALLBACK_IMPL)) { callback = new JAASUserGroupCallbackImpl(true); } else if ("custom".equalsIgnoreCase(USER_CALLBACK_IMPL)) { try { callback = (UserGroupCallback) Class.forName(CUSTOM_USER_CALLBACK_IMPL).newInstance(); } catch (Exception e) { throw new RuntimeException("Unable to create instance of custom user group callback impl", e); } } return callback; }