Package org.apache.qpid.server.security.auth

Examples of org.apache.qpid.server.security.auth.UsernamePrincipal


            byte[] challenge = server.evaluateResponse(response != null ? response : new byte[0]);

            if (server.isComplete())
            {
                final String userId = server.getAuthorizationID();
                return new AuthenticationResult(new UsernamePrincipal(userId));
            }
            else
            {
                return new AuthenticationResult(challenge, AuthenticationResult.AuthenticationStatus.CONTINUE);
            }
View Full Code Here


    {
        try
        {
            if (_principalDatabase.verifyPassword(username, password.toCharArray()))
            {
                return new AuthenticationResult(new UsernamePrincipal(username));
            }
            else
            {
                return new AuthenticationResult(AuthenticationStatus.CONTINUE);
            }
View Full Code Here

    @Override
    public boolean createUser(String username, String password, Map<String, String> attributes)
    {
        getSecurityManager().authoriseUserOperation(Operation.CREATE, username);
        return getPrincipalDatabase().createPrincipal(new UsernamePrincipal(username), password.toCharArray());

    }
View Full Code Here

    @Override
    public void deleteUser(String username) throws AccountNotFoundException
    {
        getSecurityManager().authoriseUserOperation(Operation.DELETE, username);
        getPrincipalDatabase().deletePrincipal(new UsernamePrincipal(username));

    }
View Full Code Here

    @Override
    public void setPassword(String username, String password) throws AccountNotFoundException
    {
        getSecurityManager().authoriseUserOperation(Operation.UPDATE, username);

        getPrincipalDatabase().updatePassword(new UsernamePrincipal(username), password.toCharArray());

    }
View Full Code Here

    {
        if(childClass == User.class)
        {
            String username = (String) attributes.get("name");
            String password = (String) attributes.get("password");
            Principal p = new UsernamePrincipal(username);

            if(createUser(username, password,null))
            {
                @SuppressWarnings("unchecked")
                C principalAdapter = (C) new PrincipalAdapter(p);
View Full Code Here

    }

    @Override
    public AuthenticationResult authenticate(String username, String password)
    {
        return new AuthenticationResult(new UsernamePrincipal(username));
    }
View Full Code Here

            // Process response from the client
            byte[] challenge = server.evaluateResponse(response != null ? response : new byte[0]);

            if (server.isComplete())
            {
                return new AuthenticationResult(new UsernamePrincipal(server.getAuthorizationID()));
            }
            else
            {
                return new AuthenticationResult(challenge, AuthenticationResult.AuthenticationStatus.CONTINUE);
            }
View Full Code Here

                if (_logger.isDebugEnabled())
                {
                    _logger.debug("Authenticated as " + authorizationID);
                }

                return new AuthenticationResult(new UsernamePrincipal(authorizationID));
            }
            else
            {
                return new AuthenticationResult(challenge, AuthenticationResult.AuthenticationStatus.CONTINUE);
            }
View Full Code Here

        {
            AuthenticationResult result = doLDAPNameAuthentication(getNameFromId(username), password);
            if(result.getStatus() == AuthenticationStatus.SUCCESS)
            {
                //Return a result based on the supplied username rather than the search name
                return new AuthenticationResult(new UsernamePrincipal(username));
            }
            else
            {
                return result;
            }
View Full Code Here

TOP

Related Classes of org.apache.qpid.server.security.auth.UsernamePrincipal

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.