Package org.jbpm.services.task.identity.adapter

Examples of org.jbpm.services.task.identity.adapter.UserGroupAdapter


        // If exceptions are happening here, then there is something REALLY wrong and they should be thrown.
        JaxbCommandsResponse jaxbResponse = new JaxbCommandsResponse(request);
        List<Command> commands = request.getCommands();
     
        if (commands != null) {
            UserGroupAdapter userGroupAdapter = null;
            try {
                for (int i = 0; i < commands.size(); ++i) {

                    Command<?> cmd = commands.get(i);
                    if (!AcceptedServerCommands.isAcceptedCommandClass(cmd.getClass())) {
View Full Code Here


     * </ul>
     *
     * @param msg The JMS {@link Message} received.
     */
    private UserGroupAdapter getUserFromMessageAndLookupAndInjectGroups(String [] userPass) {
        UserGroupAdapter jmsUserGroupAdapter = null;
        try {
            if( userPass == null ) {
                logger.warn("Unable to retrieve user and password from message: NOT injecting group information.");
                return null;
            }
            Subject msgSubject = tryLogin(userPass);
            if( msgSubject == null ) {
                logger.warn("Unable to login to JAAS with received user and password.");
                return null;
            }
            List<Principal> roles = getGroupsFromSubject(msgSubject);
            String [] rolesArr = new String[roles.size()];
            for( int i = 0; i < rolesArr.length; ++i ) {
                rolesArr[i] = roles.get(i).getName();
            }
            UserGroupAdapter newUserGroupAdapter = new JmsUserGroupAdapter(userPass[0], rolesArr);
            JAASUserGroupCallbackImpl.addExternalUserGroupAdapter(newUserGroupAdapter);
            jmsUserGroupAdapter = newUserGroupAdapter;
        } catch (Exception e) {
            logger.warn("Unable to retrieve group information for user in message: " + e.getMessage(), e);
        }
View Full Code Here

TOP

Related Classes of org.jbpm.services.task.identity.adapter.UserGroupAdapter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.