Package org.codehaus.plexus.security.authentication

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


            {
                return getUsernamePasswordAuthenticationToken( tokenMap );
            }
            else
            {
                throw new AuthenticationException( "Unsupported authentication token type " + tokenType );
            }
        }
        else
        {
            throw new AuthenticationException( "Unable to discover authentication token type" );
        }

    }
View Full Code Here


        Object username = tokenMap.get( TOKEN_USERNAME );
        Object password = tokenMap.get( TOKEN_PASSWORD );

        if ( username == null )
        {
            throw new AuthenticationException( "Unable to build authentication token, missing token '" + TOKEN_USERNAME
                + "'" );
        }
        else if ( password == null )
        {
            throw new AuthenticationException( "Unable to build authentication token, missing token '" + TOKEN_PASSWORD
                + "'" );
        }
        else
        {
            return new UsernamePasswordAuthenticationToken( username, password );
View Full Code Here

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

        }
        catch ( AuthenticationException e )
        {
            log( "Fatal Http Authentication Error.", e );
            throw new ServletException( "Fatal Http Authentication Error.", e );
        }
        catch ( AccountLockedException e )
        {
            httpAuth.challenge( request, response, "Repository " + getRepositoryName( davRequest ),
                                new AuthenticationException( "User account is locked" ) );
        }
        catch ( MustChangePasswordException e )
        {
            httpAuth.challenge( request, response, "Repository " + getRepositoryName( davRequest ),
                                new AuthenticationException( "You must change your password." ) );
        }

        return true;
    }
View Full Code Here

                        ",permission=" + permission + "] : " + authzResult.getException().getMessage() );
                }

                // Issue HTTP Challenge.
                httpAuth.challenge( request, response, "Repository " + getRepositoryName( davRequest ),
                                    new AuthenticationException( "Authorization Denied." ) );
                return false;
            }
        }
        catch ( AuthorizationException e )
        {
View Full Code Here

TOP

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

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.