Package org.codehaus.plexus.security.authentication

Examples of org.codehaus.plexus.security.authentication.AuthenticationResult


               
                authenticationSuccess = true;
                user.setCountFailedLoginAttempts( 0 );
                userManager.updateUser( user );
               
                return new AuthenticationResult( true, source.getPrincipal(), null );
            }
            else
            {
                getLogger().warn( "Password is Invalid for user " + source.getPrincipal() + "." );
                authnResultExceptionsMap.put( AuthenticationConstants.AUTHN_NO_SUCH_USER,
                    "Password is Invalid for user " + source.getPrincipal() + "." );
               
                try
                {
                    securityPolicy.extensionExcessiveLoginAttempts( user );
                }
                finally
                {
                    userManager.updateUser( user );
                }
               
                return new AuthenticationResult( false, source.getPrincipal(), null, authnResultExceptionsMap );
            }
        }
        catch ( UserNotFoundException e )
        {
            getLogger().warn( "Login for user " + source.getPrincipal() + " failed. user not found." );
            resultException = e;
            authnResultExceptionsMap.put( AuthenticationConstants.AUTHN_NO_SUCH_USER,
                "Login for user \" + source.getPrincipal() + \" failed. user not found." );
        }
       
        return new AuthenticationResult(authenticationSuccess, username, resultException, authnResultExceptionsMap );
    }
View Full Code Here


        try
        {
            Authentication response = manager.doAuthentication( authenticationToken );

            AuthenticationResult authResult = new AuthenticationResult( response.isAuthenticated(), response
                .getPrincipal().toString(), null );

            return authResult;
        }
        catch ( org.acegisecurity.AuthenticationException e )
        {
            return new AuthenticationResult( false, authsource.getUsername(), e );
        }
    }
View Full Code Here

        HttpServletRequest request = davRequest.getRequest();

        // Authentication Tests.
        try
        {
            AuthenticationResult result = httpAuth.getAuthenticationResult( request, response );

            if ( ( result != null ) && !result.isAuthenticated() )
            {
                // Must Authenticate.
                httpAuth.challenge( request, response, "Repository " + getRepositoryName( davRequest ),
                                    new AuthenticationException( "User Credentials Invalid" ) );
                return false;
View Full Code Here

TOP

Related Classes of org.codehaus.plexus.security.authentication.AuthenticationResult

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.