Package org.apache.cxf.jaxrs.security

Examples of org.apache.cxf.jaxrs.security.KerberosAuthOutInterceptor


    @Test
    @Ignore
    public void testGetBookWithInterceptor() throws Exception {
        WebClient wc = WebClient.create("http://localhost:" + PORT + "/bookstore/books/123");
       
        KerberosAuthOutInterceptor kbInterceptor = new KerberosAuthOutInterceptor();
       
        AuthorizationPolicy policy = new AuthorizationPolicy();
        policy.setAuthorizationType(HttpAuthHeader.AUTH_TYPE_NEGOTIATE);
        policy.setAuthorization("KerberosClient");
        policy.setUserName("alice");
        policy.setPassword("alice");
       
        kbInterceptor.setPolicy(policy);
        kbInterceptor.setCredDelegation(true);
       
        WebClient.getConfig(wc).getOutInterceptors().add(new LoggingOutInterceptor());
        WebClient.getConfig(wc).getOutInterceptors().add(kbInterceptor);
       
        Book b = wc.get(Book.class);
View Full Code Here


    @Test
    @Ignore
    public void testGetBookWithInterceptorAndKeyTab() throws Exception {
        WebClient wc = WebClient.create("http://localhost:" + PORT + "/bookstore/books/123");
       
        KerberosAuthOutInterceptor kbInterceptor = new KerberosAuthOutInterceptor();
       
        AuthorizationPolicy policy = new AuthorizationPolicy();
        policy.setAuthorizationType(HttpAuthHeader.AUTH_TYPE_NEGOTIATE);
        policy.setAuthorization("KerberosClientKeyTab");
       
        kbInterceptor.setPolicy(policy);
        kbInterceptor.setCredDelegation(true);
       
        WebClient.getConfig(wc).getOutInterceptors().add(new LoggingOutInterceptor());
        WebClient.getConfig(wc).getOutInterceptors().add(kbInterceptor);
       
        Book b = wc.get(Book.class);
View Full Code Here

    @Test
    @Ignore
    public void testGetBookWithInterceptorServiceKeyTab() throws Exception {
        WebClient wc = WebClient.create("http://localhost:" + PORT + "/bookstore/books/123");
       
        KerberosAuthOutInterceptor kbInterceptor = new KerberosAuthOutInterceptor();
       
        AuthorizationPolicy policy = new AuthorizationPolicy();
        policy.setAuthorizationType(HttpAuthHeader.AUTH_TYPE_NEGOTIATE);
        policy.setAuthorization("KerberosClient");
        policy.setUserName("alice");
        policy.setPassword("alice");
       
        kbInterceptor.setPolicy(policy);
        kbInterceptor.setServicePrincipalName("HTTP/ktab");
       
        WebClient.getConfig(wc).getOutInterceptors().add(new LoggingOutInterceptor());
        WebClient.getConfig(wc).getOutInterceptors().add(kbInterceptor);
       
        Book b = wc.get(Book.class);
View Full Code Here

TOP

Related Classes of org.apache.cxf.jaxrs.security.KerberosAuthOutInterceptor

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.