Package org.jasig.cas.authentication.handler.support

Examples of org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler


    }

    @Test(expected=UnsupportedCredentialsException.class)
    public void testNoResolverFound() throws Exception {
        AuthenticationManagerImpl manager = new AuthenticationManagerImpl();
        HttpBasedServiceCredentialsAuthenticationHandler authenticationHandler = new HttpBasedServiceCredentialsAuthenticationHandler();
        authenticationHandler.setHttpClient(new HttpClient());
        manager.setAuthenticationHandlers(Arrays.asList((AuthenticationHandler) authenticationHandler));
        manager.setCredentialsToPrincipalResolvers(Arrays.asList((CredentialsToPrincipalResolver) new UsernamePasswordCredentialsToPrincipalResolver()));
            manager.authenticate(TestUtils.getHttpBasedServiceCredentials());
    }
View Full Code Here


    }

    @Test(expected = BadCredentialsAuthenticationException.class)
    public void testResolverReturnsNull() throws Exception {
        AuthenticationManagerImpl manager = new AuthenticationManagerImpl();
        HttpBasedServiceCredentialsAuthenticationHandler authenticationHandler = new HttpBasedServiceCredentialsAuthenticationHandler();
        authenticationHandler.setHttpClient(new HttpClient());
        manager
            .setAuthenticationHandlers(Arrays.asList((AuthenticationHandler) authenticationHandler));
        manager
            .setCredentialsToPrincipalResolvers(Arrays.asList((CredentialsToPrincipalResolver) new TestCredentialsToPrincipalResolver()));
            manager.authenticate(TestUtils.getHttpBasedServiceCredentials());
View Full Code Here

TOP

Related Classes of org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler

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.