Examples of BSPEnforcer


Examples of org.apache.wss4j.dom.bsp.BSPEnforcer

       
        if (LOG.isDebugEnabled()) {
            LOG.debug(str.toString());
        }
       
        BSPEnforcer bspEnforcer = new BSPEnforcer();
        // Process the STR
        try {
            new SecurityTokenReference(strElement,bspEnforcer);
            fail("Failure expected on a Key Identifier with a Bad EncodingType");
        } catch (WSSecurityException ex) {
            // Expected
        }
       
        bspEnforcer.setIgnoredBSPRules(Collections.singletonList(BSPRule.R3071));
    }
View Full Code Here

Examples of org.apache.wss4j.dom.bsp.BSPEnforcer

       
        if (LOG.isDebugEnabled()) {
            LOG.debug(str.toString());
        }
       
        BSPEnforcer bspEnforcer = new BSPEnforcer();
        // Process the STR
        try {
            new SecurityTokenReference(strElement,bspEnforcer);
            fail("Failure expected on a Key Identifier with no EncodingType");
        } catch (WSSecurityException ex) {
            // Expected
        }
       
        bspEnforcer.setIgnoredBSPRules(Collections.singletonList(BSPRule.R3070));
    }
View Full Code Here

Examples of org.apache.wss4j.dom.bsp.BSPEnforcer

       
        if (LOG.isDebugEnabled()) {
            LOG.debug(str.toString());
        }
       
        BSPEnforcer bspEnforcer = new BSPEnforcer();
        new SecurityTokenReference(strElement, bspEnforcer);
    }
View Full Code Here

Examples of org.apache.wss4j.dom.bsp.BSPEnforcer

       
        if (LOG.isDebugEnabled()) {
            LOG.debug(DOM2Writer.nodeToString(strElement));
        }
       
        BSPEnforcer bspEnforcer = new BSPEnforcer();
        // Process the STR
        try {
            new SecurityTokenReference(strElement,bspEnforcer);
            fail("Failure expected on an Embedded Child with a SecurityTokenReference child");
        } catch (WSSecurityException ex) {
            // Expected
        }
       
        bspEnforcer.setIgnoredBSPRules(Collections.singletonList(BSPRule.R3056));
    }
View Full Code Here

Examples of org.apache.wss4j.dom.bsp.BSPEnforcer

       
        if (LOG.isDebugEnabled()) {
            LOG.debug(DOM2Writer.nodeToString(strElement));
        }
       
        BSPEnforcer bspEnforcer = new BSPEnforcer();
        // Process the STR
        try {
            new SecurityTokenReference(strElement,bspEnforcer);
            fail("Failure expected on an Embedded Child with multiple children");
        } catch (WSSecurityException ex) {
            // Expected
        }
       
        bspEnforcer.setIgnoredBSPRules(Collections.singletonList(BSPRule.R3060));
    }
View Full Code Here

Examples of org.apache.wss4j.dom.bsp.BSPEnforcer

       
        Timestamp receivedTimestamp =
            (Timestamp)actionResult.get(WSSecurityEngineResult.TAG_TIMESTAMP);
        assertTrue(receivedTimestamp != null);
       
        Timestamp clone = new Timestamp(receivedTimestamp.getElement(), new BSPEnforcer(true));
        assertTrue(clone.equals(receivedTimestamp));
        assertTrue(clone.hashCode() == receivedTimestamp.hashCode());
    }
View Full Code Here

Examples of org.apache.wss4j.dom.bsp.BSPEnforcer

   
    public DerivedKeyTokenTest() throws Exception {
        token = new DerivedKeyToken(createReferenceDocument(
                TEST_TOKEN_TEMPLATE,
                "#uuid-4063ae9b-fe66-4e09-a5fb-8fda903f34d8", "16")
                .getDocumentElement(), new BSPEnforcer());
        tokenEqual = new DerivedKeyToken(createReferenceDocument(
                TEST_TOKEN_TEMPLATE,
                "#uuid-4063ae9b-fe66-4e09-a5fb-8fda903f34d8", "16")
                .getDocumentElement(), new BSPEnforcer());
        tokenNotEqual = new DerivedKeyToken(createReferenceDocument(
                TEST_TOKEN_TEMPLATE,
                "#uuid-5603ae9b-fe66-4e09-a5fb-8fda903f34d8", "88")
                .getDocumentElement(), new BSPEnforcer());
    }
View Full Code Here

Examples of org.apache.wss4j.dom.bsp.BSPEnforcer

            WSSecurityUtil.fetchActionResult(results, WSConstants.BST);
        BinarySecurity token =
            (BinarySecurity)actionResult.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN);
        assertNotNull(token);
       
        BinarySecurity clone = new BinarySecurity(token.getElement(), new BSPEnforcer(true));
        assertTrue(clone.equals(token));
        assertTrue(clone.hashCode() == token.hashCode());
    }
View Full Code Here

Examples of org.apache.wss4j.dom.bsp.BSPEnforcer

            }
            //
            // The element to transform MUST be a SecurityTokenReference
            // element.
            //
            SecurityTokenReference secRef = new SecurityTokenReference(str, new BSPEnforcer());
           
            Canonicalizer canon = Canonicalizer.getInstance(canonAlgo);

            byte[] buf = null;
           
View Full Code Here

Examples of org.apache.wss4j.dom.bsp.BSPEnforcer

        UsernameToken receivedToken =
            (UsernameToken) actionResult.get(WSSecurityEngineResult.TAG_USERNAME_TOKEN);
        assertTrue(receivedToken != null);
       
        UsernameToken clone =
            new UsernameToken(receivedToken.getElement(), false, new BSPEnforcer());
        assertTrue(clone.equals(receivedToken));
        assertTrue(clone.hashCode() == receivedToken.hashCode());
    }
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.