Package org.apache.beehive.wsm.axis.security

Examples of org.apache.beehive.wsm.axis.security.User


        if (logger.isDebugEnabled()) {
            logger.debug("username from client : " + username);
        }

        User user = userList.getUser ( username );


        if ( user == null ) {
            if (logger.isDebugEnabled()) {
                logger.debug("user returned from userList is null");
            }
            return false; // user doesn't exist.
        }

        if ( ! user.authenticate( msgContext.getPassword() ) )
        {
            if (logger.isDebugEnabled()) {
                logger.debug("authenticate failed");
            }
            return false; // password doesn't match.
        }

        if (logger.isDebugEnabled()) {
            logger.debug("authenticate passed (" + username + ")");
        }

        for ( Role role : user.getRoles() )
        {

            if (logger.isDebugEnabled()) {
                logger.debug("user [" + user.getName() + "] role ["+ role.getName() +"]");
            }

            for ( String roleAllowed : rolesAllowed )
            {
                if ( role.getName().equals( roleAllowed ) )
                {
                    if (logger.isDebugEnabled()) {
                        logger.debug( "auth : " + user.getName()+ " is in role [" + roleAllowed + "]");
                    }
                    msgContext.setProperty(SecurityModel.BEEHIVE_AUTHUSER, user);
                    return true;
                }
            }
View Full Code Here

TOP

Related Classes of org.apache.beehive.wsm.axis.security.User

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.