Examples of SamlHeaderOutInterceptor


Examples of org.apache.cxf.rs.security.saml.SamlHeaderOutInterceptor

   
    @Test
    public void testGetBookSAMLTokenAsHeader() throws Exception {
        String address = "https://localhost:" + PORT + "/samlheader/bookstore/books/123";
       
        WebClient wc = createWebClient(address, new SamlHeaderOutInterceptor(), null, true);
       
        try {
            Book book = wc.get(Book.class);
            assertEquals(123L, book.getId());
        } catch (WebApplicationException ex) {
View Full Code Here

Examples of org.apache.cxf.rs.security.saml.SamlHeaderOutInterceptor

    @Test
    public void testGetBookPreviousSAMLTokenAsHeader() throws Exception {
        String address = "https://localhost:" + PORT + "/samlheader/bookstore/books/123";
       
        WebClient wc =
            createWebClientForExistingToken(address, new SamlHeaderOutInterceptor(), null);
       
        try {
            Book book = wc.get(Book.class);
            assertEquals(123L, book.getId());
        } catch (WebApplicationException ex) {
View Full Code Here

Examples of org.apache.cxf.rs.security.saml.SamlHeaderOutInterceptor

   
    @Test
    public void testGetBookSAMLTokenAsHeader() throws Exception {
        String address = "https://localhost:" + PORT + "/samlheader/bookstore/books/123";
       
        WebClient wc = createWebClient(address, new SamlHeaderOutInterceptor(), null, true);
       
        try {
            Book book = wc.get(Book.class);
            assertEquals(123L, book.getId());
        } catch (ServerWebApplicationException ex) {
View Full Code Here

Examples of org.apache.cxf.rs.security.saml.SamlHeaderOutInterceptor

   
    @Test
    public void testGetBookSAMLTokenAsHeader() throws Exception {
        String address = "https://localhost:" + PORT + "/samlheader/bookstore/books/123";
       
        WebClient wc = createWebClient(address, new SamlHeaderOutInterceptor(), null, true);
       
        try {
            Book book = wc.get(Book.class);
            assertEquals(123L, book.getId());
        } catch (ServerWebApplicationException ex) {
View Full Code Here

Examples of org.apache.cxf.rs.security.saml.SamlHeaderOutInterceptor

   
    @Test
    public void testGetBookSAMLTokenAsHeader() throws Exception {
        String address = "https://localhost:" + PORT + "/samlheader/bookstore/books/123";
       
        WebClient wc = createWebClient(address, new SamlHeaderOutInterceptor(), null, true);
       
        try {
            Book book = wc.get(Book.class);
            assertEquals(123L, book.getId());
        } catch (WebApplicationException ex) {
View Full Code Here

Examples of org.apache.cxf.rs.security.saml.SamlHeaderOutInterceptor

   
    @Test
    public void testGetBookSAMLTokenAsHeader() throws Exception {
        String address = "https://localhost:" + PORT + "/samlheader/bookstore/books/123";
       
        WebClient wc = createWebClient(address, new SamlHeaderOutInterceptor(), null, true);
       
        try {
            Book book = wc.get(Book.class);
            assertEquals(123L, book.getId());
        } catch (WebApplicationException ex) {
View Full Code Here

Examples of org.apache.cxf.rs.security.saml.SamlHeaderOutInterceptor

    @Test
    public void testGetBookPreviousSAMLTokenAsHeader() throws Exception {
        String address = "https://localhost:" + PORT + "/samlheader/bookstore/books/123";
       
        WebClient wc =
            createWebClientForExistingToken(address, new SamlHeaderOutInterceptor(), null);
       
        try {
            Book book = wc.get(Book.class);
            assertEquals(123L, book.getId());
        } catch (WebApplicationException ex) {
View Full Code Here

Examples of org.apache.cxf.rs.security.saml.SamlHeaderOutInterceptor

        stsClient.setKeyType(BEARER_KEYTYPE);

        STSRESTOutInterceptor outInterceptor = new STSRESTOutInterceptor();
        outInterceptor.setStsClient(stsClient);
        clientFactory.getOutInterceptors().add(outInterceptor);
        clientFactory.getOutInterceptors().add(new SamlHeaderOutInterceptor());
    }
View Full Code Here

Examples of org.apache.cxf.rs.security.saml.SamlHeaderOutInterceptor

   
    @Test
    public void testGetBookSAMLTokenAsHeader() throws Exception {
        String address = "https://localhost:" + PORT + "/samlheader/bookstore/books/123";
       
        WebClient wc = createWebClient(address, new SamlHeaderOutInterceptor(), null, true);
       
        try {
            Book book = wc.get(Book.class);
            assertEquals(123L, book.getId());
        } catch (ServerWebApplicationException ex) {
View Full Code Here

Examples of org.apache.cxf.rs.security.saml.SamlHeaderOutInterceptor

                STSRESTOutInterceptor outInterceptor = new STSRESTOutInterceptor();
                outInterceptor.setStsClient(stsClient);

                factoryBean.getOutInterceptors().add(outInterceptor);
                factoryBean.getOutInterceptors().add(new SamlHeaderOutInterceptor());
            }

            cachedClientFactory = factoryBean;
        }
        return cachedClientFactory;
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.