Package org.apache.maven.wagon.authentication

Examples of org.apache.maven.wagon.authentication.AuthenticationInfo


    public void openConnectionInternal()
        throws AuthenticationException
    {
        if ( authenticationInfo == null )
        {
            authenticationInfo = new AuthenticationInfo();
        }

        if ( !interactive )
        {
            uIKeyboardInteractive = null;
View Full Code Here


    @Test
    public void forbidden()
        throws ConnectionException, ComponentConfigurationException, IOException, ResourceDoesNotExistException,
        TransferFailedException
    {
        AuthenticationInfo info = new AuthenticationInfo();
        info.setUserName( "user" );
        info.setPassword( "password" );

        getServerFixture().addUser( info.getUserName(), "password" );

        getServerFixture().addServlet( "/403.txt",
                                       new ErrorCodeServlet( HttpServletResponse.SC_FORBIDDEN, "Expected 403" ) );

        testAuthFailure( "403.txt", info );
View Full Code Here

    @Test
    public void successfulAuthentication()
        throws ConnectionException, AuthenticationException, ComponentConfigurationException, IOException,
        TransferFailedException, ResourceDoesNotExistException, AuthorizationException
    {
        AuthenticationInfo info = new AuthenticationInfo();
        info.setUserName( "user" );
        info.setPassword( "password" );

        getServerFixture().addUser( info.getUserName(), info.getPassword() );

        if ( !initTest( info, null ) )
        {
            return;
        }
View Full Code Here

    @Test
    public void unsuccessfulAuthentication()
        throws ConnectionException, ComponentConfigurationException, IOException, TransferFailedException,
        ResourceDoesNotExistException
    {
        AuthenticationInfo info = new AuthenticationInfo();
        info.setUserName( "user" );
        info.setPassword( "password" );

        getServerFixture().addUser( info.getUserName(), "anotherPassword" );

        testAuthFailure( "protected/base.txt", info );
    }
View Full Code Here

        this.repository = repository;

        if ( authenticationInfo == null )
        {
            authenticationInfo = new AuthenticationInfo();
        }

        if ( authenticationInfo.getUserName() == null )
        {
            // Get user/pass that were encoded in the URL.
View Full Code Here

    {
        CommandExecutor exec = (CommandExecutor) lookup( CommandExecutor.ROLE );

        Repository repository = getTestRepository();

        AuthenticationInfo authenticationInfo = new AuthenticationInfo();
        authenticationInfo.setUserName( System.getProperty( "user.name" ) );

        exec.connect( repository, authenticationInfo );

        try
        {
View Full Code Here

    {
        CommandExecutor exec = (CommandExecutor) lookup( CommandExecutor.ROLE );

        Repository repository = getTestRepository();

        AuthenticationInfo authenticationInfo = new AuthenticationInfo();
        authenticationInfo.setUserName( System.getProperty( "user.name" ) );

        exec.connect( repository, authenticationInfo );

        try
        {
View Full Code Here

    {
        CommandExecutor exec = (CommandExecutor) lookup( CommandExecutor.ROLE );

        Repository repository = getTestRepository();

        AuthenticationInfo authenticationInfo = new AuthenticationInfo();
        authenticationInfo.setUserName( System.getProperty( "user.name" ) );

        exec.connect( repository, authenticationInfo );

        try
        {
View Full Code Here

    public void testSecuredGetWrongPassword()
        throws Exception
    {
        try
        {
            AuthenticationInfo authInfo = new AuthenticationInfo();
            authInfo.setUserName( "user" );
            authInfo.setPassword( "admin" );
            runTestSecuredGet( authInfo );
            fail();
        }
        catch ( AuthorizationException e )
        {
View Full Code Here

    }

    public void testSecuredGet()
        throws Exception
    {
        AuthenticationInfo authInfo = new AuthenticationInfo();
        authInfo.setUserName( "user" );
        authInfo.setPassword( "secret" );
        runTestSecuredGet( authInfo );
    }
View Full Code Here

TOP

Related Classes of org.apache.maven.wagon.authentication.AuthenticationInfo

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.