Package org.apache.ws.security.saml

Examples of org.apache.ws.security.saml.SAMLIssuer


        Crypto userCrypto = CryptoFactory.getInstance("wss40.properties");
       
        SAML1CallbackHandler callbackHandler = new SAML1CallbackHandler();
        callbackHandler.setStatement(SAML1CallbackHandler.Statement.AUTHN);
        callbackHandler.setConfirmationMethod(SAML1Constants.CONF_HOLDER_KEY);
        SAMLIssuer saml = new SAMLIssuerImpl();
        saml.setIssuerName("www.example.com");
        saml.setIssuerCrypto(issuerCrypto);
        saml.setIssuerKeyName("wss40_server");
        saml.setIssuerKeyPassword("security");
        saml.setSignAssertion(true);
        saml.setCallbackHandler(callbackHandler);
        AssertionWrapper assertion = saml.newAssertion();

        WSSecSignatureSAML wsSign = new WSSecSignatureSAML();
        wsSign.setKeyIdentifierType(WSConstants.BST_DIRECT_REFERENCE);
        wsSign.setUserInfo("wss40", "security");
       
View Full Code Here


     *
     * @throws Exception Thrown when there is any problem in signing or verification
     */
    public void testSAMLSignedSenderVouches() throws Exception {
        SOAPEnvelope unsignedEnvelope = message.getSOAPEnvelope();
        SAMLIssuer saml = SAMLIssuerFactory.getInstance("saml3.properties");

        SAMLAssertion assertion = saml.newAssertion();

        String issuerKeyName = saml.getIssuerKeyName();
        String issuerKeyPW = saml.getIssuerKeyPassword();
        Crypto issuerCrypto = saml.getIssuerCrypto();
        WSSignEnvelope wsSign = new WSSignEnvelope();
        wsSign.setKeyIdentifierType(WSConstants.BST_DIRECT_REFERENCE);

        log.info("Before SAMLSignedSenderVouches....");
       
View Full Code Here

     *
     * @throws Exception Thrown when there is any problem in signing or verification
     */
    public void testSAMLSignedSenderVouches() throws Exception {
        SOAPEnvelope unsignedEnvelope = message.getSOAPEnvelope();
        SAMLIssuer saml = SAMLIssuerFactory.getInstance("saml3.properties");

        SAMLAssertion assertion = saml.newAssertion();

        String issuerKeyName = saml.getIssuerKeyName();
        String issuerKeyPW = saml.getIssuerKeyPassword();
        Crypto issuerCrypto = saml.getIssuerCrypto();
        WSSignEnvelope wsSign = new WSSignEnvelope();
        wsSign.setKeyIdentifierType(WSConstants.BST_DIRECT_REFERENCE);

        log.info("Before SAMLSignedSenderVouches....");
       
View Full Code Here

        SOAPEnvelope unsignedEnvelope = message.getSOAPEnvelope();
        SOAPEnvelope envelope = null;

        Document doc = unsignedEnvelope.getAsDocument();
       
        SAMLIssuer saml = SAMLIssuerFactory.getInstance("saml4.properties");
        // Provide info to SAML issuer that it can construct a Holder-of-key
        // SAML token.
        saml.setInstanceDoc(doc);
        saml.setUserCrypto(crypto);
        saml.setUsername("16c73ab6-b892-458f-abf5-2f875f74882e");
        SAMLAssertion assertion = saml.newAssertion();

        WSSignEnvelope wsSign = new WSSignEnvelope();
        wsSign.setKeyIdentifierType(WSConstants.BST_DIRECT_REFERENCE);
        wsSign.setUserInfo("16c73ab6-b892-458f-abf5-2f875f74882e", "security");
View Full Code Here

     * @throws Exception Thrown when there is any problem in signing or verification
     */
    public void testSAMLUnsignedSenderVouches() throws Exception {
        SOAPEnvelope unsignedEnvelope = message.getSOAPEnvelope();
        SOAPEnvelope envelope = null;
        SAMLIssuer saml = SAMLIssuerFactory.getInstance("saml.properties");

        SAMLAssertion assertion = saml.newAssertion();

        WSSAddSAMLToken wsSign = new WSSAddSAMLToken();

        Document doc = unsignedEnvelope.getAsDocument();
        log.info("Before SAMLUnsignedSenderVouches....");
View Full Code Here

     *
     * @throws Exception Thrown when there is any problem in signing or verification
     */
    public void testSAMLUnsignedSenderVouches() throws Exception {
        SOAPEnvelope unsignedEnvelope = message.getSOAPEnvelope();
        SAMLIssuer saml = SAMLIssuerFactory.getInstance("saml.properties");

        SAMLAssertion assertion = saml.newAssertion();

        WSSAddSAMLToken wsSign = new WSSAddSAMLToken();

        Document doc = unsignedEnvelope.getAsDocument();
        log.info("Before SAMLUnsignedSenderVouches....");
View Full Code Here

     * @throws Exception Thrown when there is any problem in signing or verification
     */
    public void testSAMLUnsignedSenderVouches() throws Exception {
        SOAPEnvelope unsignedEnvelope = message.getSOAPEnvelope();
        SOAPEnvelope envelope = null;
        SAMLIssuer saml = SAMLIssuerFactory.getInstance("saml.properties");

        SAMLAssertion assertion = saml.newAssertion();

        WSSAddSAMLToken wsSign = new WSSAddSAMLToken();

        Document doc = unsignedEnvelope.getAsDocument();
        log.info("Before SAMLUnsignedSenderVouches....");
View Full Code Here

        SOAPEnvelope unsignedEnvelope = message.getSOAPEnvelope();
        SOAPEnvelope envelope = null;

        Document doc = unsignedEnvelope.getAsDocument();
       
        SAMLIssuer saml = SAMLIssuerFactory.getInstance("saml4.properties");
        // Provide info to SAML issuer that it can construct a Holder-of-key
        // SAML token.
        saml.setInstanceDoc(doc);
        saml.setUserCrypto(crypto);
        saml.setUsername("16c73ab6-b892-458f-abf5-2f875f74882e");
        SAMLAssertion assertion = saml.newAssertion();

        WSSignEnvelope wsSign = new WSSignEnvelope();
        wsSign.setKeyIdentifierType(WSConstants.BST_DIRECT_REFERENCE);
        wsSign.setUserInfo("16c73ab6-b892-458f-abf5-2f875f74882e", "security");
View Full Code Here

     *
     * @throws Exception Thrown when there is any problem in signing or verification
     */
    public void testSAMLSignedSenderVouches() throws Exception {
        SOAPEnvelope unsignedEnvelope = message.getSOAPEnvelope();
        SAMLIssuer saml = SAMLIssuerFactory.getInstance("saml3.properties");

        SAMLAssertion assertion = saml.newAssertion();

        String issuerKeyName = saml.getIssuerKeyName();
        String issuerKeyPW = saml.getIssuerKeyPassword();
        Crypto issuerCrypto = saml.getIssuerCrypto();
        WSSignEnvelope wsSign = new WSSignEnvelope();
        wsSign.setKeyIdentifierType(WSConstants.BST_DIRECT_REFERENCE);

        log.info("Before SAMLSignedSenderVouches....");
       
View Full Code Here

     *
     * @throws Exception Thrown when there is any problem in signing or verification
     */
    public void testSAMLSignedSenderVouches() throws Exception {
        SOAPEnvelope unsignedEnvelope = message.getSOAPEnvelope();
        SAMLIssuer saml = SAMLIssuerFactory.getInstance("saml3.properties");

        SAMLAssertion assertion = saml.newAssertion();

        String issuerKeyName = saml.getIssuerKeyName();
        String issuerKeyPW = saml.getIssuerKeyPassword();
        Crypto issuerCrypto = saml.getIssuerCrypto();
        WSSignEnvelope wsSign = new WSSignEnvelope();
        wsSign.setKeyIdentifierType(WSConstants.BST_DIRECT_REFERENCE);

        log.info("Before SAMLSignedSenderVouches....");
       
View Full Code Here

TOP

Related Classes of org.apache.ws.security.saml.SAMLIssuer

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.