Examples of AuthorizationResult


Examples of org.codehaus.plexus.redback.authorization.AuthorizationResult

            if ( isWriteRequest )
            {
                permission = ArchivaRoleConstants.OPERATION_REPOSITORY_UPLOAD;
            }

            AuthorizationResult authzResult = securitySystem.authorize( securitySession, permission, davRequest
                .getPrefix() );

            if ( !authzResult.isAuthorized() )
            {
                if ( authzResult.getException() != null )
                {
                    log( "Authorization Denied [ip=" + request.getRemoteAddr() + ",isWriteRequest=" + isWriteRequest
                        + ",permission=" + permission + ",repo=" + davRequest.getPrefix() + "] : "
                        + authzResult.getException().getMessage() );
                }

                // Issue HTTP Challenge.
                httpAuth.challenge( request, response, "Repository " + getRepositoryName( davRequest ),
                                    new AuthenticationException( "Authorization Denied." ) );
View Full Code Here

Examples of org.codehaus.plexus.redback.authorization.AuthorizationResult

            if ( isWriteRequest )
            {
                permission = ArchivaRoleConstants.OPERATION_REPOSITORY_UPLOAD;
            }

            AuthorizationResult authzResult =
                securitySystem.authorize( securitySession, permission, davRequest.getPrefix() );

            if ( !authzResult.isAuthorized() )
            {
                if ( authzResult.getException() != null )
                {
                    log( "Authorization Denied [ip=" + request.getRemoteAddr() + ",isWriteRequest=" + isWriteRequest +
                        ",permission=" + permission + ",repo=" + davRequest.getPrefix() + "] : " +
                        authzResult.getException().getMessage() );
                }

                // Issue HTTP Challenge.
                httpAuth.challenge( request, response, "Repository " + getRepositoryName( davRequest ),
                                    new AuthenticationException( "Authorization Denied." ) );
View Full Code Here

Examples of org.codehaus.plexus.redback.authorization.AuthorizationResult

            if ( isWriteRequest )
            {
                permission = ArchivaRoleConstants.OPERATION_REPOSITORY_UPLOAD;
            }

            AuthorizationResult authzResult =
                securitySystem.authorize( securitySession, permission, davRequest.getPrefix() );

            if ( !authzResult.isAuthorized() )
            {
                if ( authzResult.getException() != null )
                {
                    log( "Authorization Denied [ip=" + request.getRemoteAddr() + ",isWriteRequest=" + isWriteRequest +
                        ",permission=" + permission + ",repo=" + davRequest.getPrefix() + "] : " +
                        authzResult.getException().getMessage() );
                }

                // Issue HTTP Challenge.
                httpAuth.challenge( request, response, "Repository " + getRepositoryName( davRequest ),
                                    new AuthenticationException( "Authorization Denied." ) );
View Full Code Here

Examples of org.codehaus.plexus.redback.authorization.AuthorizationResult

    }

    public AuthorizationResult authorize( SecuritySession session, Object permission )
        throws AuthorizationException
    {
        return new AuthorizationResult( true, session.getUser(), null );
    }
View Full Code Here

Examples of org.codehaus.plexus.redback.authorization.AuthorizationResult

    }

    public AuthorizationResult authorize( SecuritySession session, Object permission, Object resource )
        throws AuthorizationException
    {
        return new AuthorizationResult( true, session.getUser(), null );
    }
View Full Code Here

Examples of org.codehaus.plexus.redback.authorization.AuthorizationResult

    }

    public AuthorizationResult authorize( SecuritySession arg0, Object arg1, Object arg2 )
        throws AuthorizationException
    {
        AuthorizationResult result = new AuthorizationResult( true, arg1, null);
       
        return result;
    }
View Full Code Here

Examples of org.codehaus.plexus.redback.authorization.AuthorizationResult

    }

    public AuthorizationResult authorize( SecuritySession session, Object permission )
        throws AuthorizationException
    {
        return new AuthorizationResult( true, session.getUser(), null );
    }
View Full Code Here

Examples of org.codehaus.plexus.redback.authorization.AuthorizationResult

    }

    public AuthorizationResult authorize( SecuritySession session, Object permission, Object resource )
        throws AuthorizationException
    {
        return new AuthorizationResult( true, session.getUser(), null );
    }
View Full Code Here

Examples of org.codehaus.plexus.redback.authorization.AuthorizationResult

        if ( isWriteRequest )
        {
            permission = ArchivaRoleConstants.OPERATION_REPOSITORY_UPLOAD;
        }

        AuthorizationResult authzResult = securitySystem.authorize( securitySession, permission, repositoryId );

        if ( !authzResult.isAuthorized() )
        {
            if ( authzResult.getException() != null )
            {
                log.info( "Authorization Denied [ip=" + request.getRemoteAddr() + ",isWriteRequest=" + isWriteRequest +
                    ",permission=" + permission + ",repo=" + repositoryId + "] : " +
                    authzResult.getException().getMessage() );

                throw new UnauthorizedException( "Access denied for repository " + repositoryId );
            }
            throw new UnauthorizedException( "User account is locked" );
        }
View Full Code Here

Examples of org.codehaus.plexus.redback.authorization.AuthorizationResult

    }

    public AuthorizationResult authorize( SecuritySession arg0, Object arg1, Object arg2 )
        throws AuthorizationException
    {
        AuthorizationResult result = new AuthorizationResult( true, arg1, null);
       
        return result;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.