Examples of SAMLObject


Examples of org.opensaml.common.SAMLObject

     * @param encryptedAssertion the EncryptedAssertion to decrypt
     * @return an Assertion
     * @throws DecryptionException thrown when decryption generates an error
     */
    public Assertion decrypt(EncryptedAssertion encryptedAssertion) throws DecryptionException {
        SAMLObject samlObject = decryptData(encryptedAssertion);
        if (! (samlObject instanceof Assertion)) {
            throw new DecryptionException("Decrypted SAMLObject was not an instance of Assertion");
        }
        return (Assertion) samlObject;
    }
View Full Code Here

Examples of org.opensaml.common.SAMLObject

     * @param encryptedAttribute the EncryptedAttribute to decrypt
     * @return an Attribute
     * @throws DecryptionException thrown when decryption generates an error
     */
    public Attribute decrypt(EncryptedAttribute encryptedAttribute) throws DecryptionException {
        SAMLObject samlObject = decryptData(encryptedAttribute);
        if (! (samlObject instanceof Attribute)) {
            throw new DecryptionException("Decrypted SAMLObject was not an instance of Attribute");
        }
        return (Attribute) samlObject;
    }
View Full Code Here

Examples of org.opensaml.common.SAMLObject

     * @param newEncryptedID the NewEncryptedID to decrypt
     * @return a NewID
     * @throws DecryptionException thrown when decryption generates an error
     */
    public NewID decrypt(NewEncryptedID newEncryptedID) throws DecryptionException {
        SAMLObject samlObject = decryptData(newEncryptedID);
        if (! (samlObject instanceof NewID)) {
            throw new DecryptionException("Decrypted SAMLObject was not an instance of NewID");
        }
        return (NewID) samlObject;
    }
View Full Code Here

Examples of org.opensaml.common.SAMLObject

                log.trace("Serialized SAMLObject data was:");
                log.trace(getSerializedMessage());
            }
            StringReader reader = new StringReader(getSerializedMessage());
            try {
                SAMLObject samlObject = (SAMLObject) XMLObjectHelper.unmarshallFromReader(parserPool, reader);
                message = samlObject;
            } catch (XMLParserException e) {
                throw new IOException("Error parsing XML into DOM: " + e.getMessage());
            } catch (UnmarshallingException e) {
                throw new IOException("Error unmarshalling DOM into SAMLObject: " + e.getMessage());
View Full Code Here

Examples of org.opensaml.common.SAMLObject

    /** {@inheritDoc} */
    public SAMLArtifactMapEntry newEntry(String artifact, String issuerId, String relyingPartyId,
            SAMLObject samlMessage, long lifetime) {
       
        SAMLObject newSAMLMessage = getStorableSAMLMessage(samlMessage);
       
        BasicSAMLArtifactMapEntry  entry =
            new BasicSAMLArtifactMapEntry(artifact, issuerId, relyingPartyId, newSAMLMessage , lifetime);
       
        if (serializeMessage) {
View Full Code Here

Examples of org.opensaml.common.SAMLObject

                    "Invalid outbound message transport type, this encoder only support HTTPOutTransport");
        }

        SAMLMessageContext samlMsgCtx = (SAMLMessageContext) messageContext;

        SAMLObject outboundMessage = samlMsgCtx.getOutboundSAMLMessage();
        if (outboundMessage == null) {
            throw new MessageEncodingException("No outbound SAML message contained in message context");
        }
        String endpointURL = getEndpointURL(samlMsgCtx).buildURL();
View Full Code Here

Examples of org.opensaml.common.SAMLObject

    /** {@inheritDoc} */
    protected void doEncode(MessageContext messageContext) throws MessageEncodingException {
        validateMessageContent(messageContext);
        SAMLMessageContext samlMsgCtx = (SAMLMessageContext) messageContext;

        SAMLObject samlMessage = samlMsgCtx.getOutboundSAMLMessage();
        if (samlMessage == null) {
            throw new MessageEncodingException("No outbound SAML message contained in message context");
        }

        signMessage(samlMsgCtx);
View Full Code Here

Examples of org.opensaml.common.SAMLObject

     *
     * @throws MessageEncodingException thrown if there is a problem preparing the signature for signing
     */
    @SuppressWarnings("unchecked")
    protected void signMessage(SAMLMessageContext messageContext) throws MessageEncodingException {
        SAMLObject outboundMessage = messageContext.getOutboundSAMLMessage();
        if (outboundMessage instanceof SignableSAMLObject
                && messageContext.getOuboundSAMLMessageSigningCredential() != null) {
            log.debug("Signing outbound SAML message.");
            SignableSAMLObject signableMessage = (SignableSAMLObject) outboundMessage;
            Credential signingCredential = messageContext.getOuboundSAMLMessageSigningCredential();
View Full Code Here

Examples of org.opensaml.common.SAMLObject

                    .getElementQName());
            throw new MessageDecodingException("Unexpected SOAP body content.  Expected a SAML request but recieved "
                    + incommingMessage.getElementQName());
        }

        SAMLObject samlMessage = (SAMLObject) incommingMessage;
        log.debug("Decoded SOAP messaged which included SAML message of type {}", samlMessage.getElementQName());
        samlMsgCtx.setInboundSAMLMessage(samlMessage);

        populateMessageContext(samlMsgCtx);
    }
View Full Code Here

Examples of org.opensaml.common.SAMLObject

        String relayState = inTransport.getParameterValue("RelayState");
        samlMsgCtx.setRelayState(relayState);
        log.debug("Decoded SAML relay state of: {}", relayState);

        InputStream base64DecodedMessage = getBase64DecodedMessage(inTransport);
        SAMLObject inboundMessage = (SAMLObject) unmarshallMessage(base64DecodedMessage);
        samlMsgCtx.setInboundMessage(inboundMessage);
        samlMsgCtx.setInboundSAMLMessage(inboundMessage);
        log.debug("Decoded SAML message");

        populateMessageContext(samlMsgCtx);
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.