ResponseType responseType = null; SAML2Response saml2Response = new SAML2Response(); try responseType = saml2Response.createResponseType(id, sp, idp, issuerHolder); responseType = saml2Response.createResponseType(id); responseType = saml2Response.createResponseType(id); try saml2Response.marshall(responseType, sw); try samlResponse = saml2Response.convert(responseType);
private SAMLDocumentHolder getSAMLDocumentHolder(String samlResponse) throws ParsingException, ConfigurationException, ProcessingException { SAML2Response saml2Response = new SAML2Response(); InputStream dataStream = null; if (isPostBinding()) { // deal with SAML response from IDP dataStream = PostBindingUtil.base64DecodeAsStream(samlResponse); } else { // deal with SAML response from IDP dataStream = RedirectBindingUtil.base64DeflateDecode(samlResponse); } try { saml2Response.getSAML2ObjectFromStream(dataStream); } catch (ProcessingException pe) { logger.samlResponseFromIDPParsingFailed(); throw pe; } catch (ParsingException pe) { logger.samlResponseFromIDPParsingFailed(); throw pe; } return saml2Response.getSamlDocumentHolder(); } }
/** * Sign an assertion whose id value is provided in the response type * @param response * @param idValueOfAssertion * @param keypair * @param referenceURI * @return * @throws ParserConfigurationException * @throws TransformerException * @throws TransformerFactoryConfigurationError * @throws XPathException * @throws XMLSignatureException * @throws MarshalException * @throws GeneralSecurityException */ public Document sign(ResponseType response, String idValueOfAssertion, KeyPair keypair, String referenceURI) throws ParserConfigurationException, XPathException, TransformerFactoryConfigurationError, TransformerException, GeneralSecurityException, MarshalException, XMLSignatureException { SAML2Response saml2Response = new SAML2Response(); Document doc = saml2Response.convert(response); return sign(doc, idValueOfAssertion, keypair, referenceURI); }
SAML2Response saml2Response = new SAML2Response(); sp.setRequestID(requestID); sp.setIssuer(art.getIssuer().getValue()); responseType = saml2Response.createResponseType(id, sp, idp, issuerHolder); samlResponseDocument = saml2Response.convert(responseType);
ResponseType responseType = createResponseType(ID, issuerInfo, assertion);
if (!isUnsolicitedResponse(authnRequestType)) { subjectConfirmationData.setInResponseTo(sp.getRequestID()); ResponseType responseType = createResponseType(ID, issuerInfo, assertionType); if (!isUnsolicitedResponse(authnRequestType)) {
/** * Sign an ResponseType at the root * @param response * @param keypair Key Pair * @param digestMethod (Example: DigestMethod.SHA1) * @param signatureMethod (Example: SignatureMethod.DSA_SHA1) * @return * @throws ParserConfigurationException * @throws XMLSignatureException * @throws MarshalException * @throws GeneralSecurityException */ public Document sign(ResponseType response, KeyPair keypair) throws ParserConfigurationException, GeneralSecurityException, MarshalException, XMLSignatureException { SAML2Response saml2Request = new SAML2Response(); Document doc = saml2Request.convert(response); doc.normalize(); return sign(doc, response.getID(), keypair); }
SAML2Response saml2Response = new SAML2Response(); sp.setIssuer(art.getIssuer().getValue()); sp.setAuthnRequestType(art); responseType = saml2Response.createResponseType(id, sp, idp, issuerHolder); samlResponseDocument = saml2Response.convert(responseType);
ResponseType responseType = createResponseType(ID, issuerInfo, assertion);
if (!isUnsolicitedResponse(authnRequestType)) { subjectConfirmationData.setInResponseTo(sp.getRequestID()); ResponseType responseType = createResponseType(ID, issuerInfo, assertionType); if (!isUnsolicitedResponse(authnRequestType)) {
ResponseType responseType = null; SAML2Response saml2Response = new SAML2Response(); try responseType = saml2Response.createResponseType(id, sp, idp, issuerHolder); responseType = saml2Response.createResponseType(id); responseType = saml2Response.createResponseType(id); try saml2Response.marshall(responseType, sw); try samlResponse = saml2Response.convert(responseType);
/** * Sign an assertion whose id value is provided in the response type * * @param response * @param idValueOfAssertion * @param keypair * @param referenceURI * @return * @throws ParserConfigurationException * @throws TransformerException * @throws TransformerFactoryConfigurationError * @throws XPathException * @throws XMLSignatureException * @throws MarshalException * @throws GeneralSecurityException */ public Document sign(ResponseType response, String idValueOfAssertion, KeyPair keypair, String referenceURI) throws ParserConfigurationException, XPathException, TransformerFactoryConfigurationError, TransformerException, GeneralSecurityException, MarshalException, XMLSignatureException { SAML2Response saml2Response = new SAML2Response(); Document doc = saml2Response.convert(response); doc.normalize(); Node theSibling = getNextSiblingOfIssuer(doc); if (theSibling != null) { this.sibling = theSibling; } return sign(doc, idValueOfAssertion, keypair, referenceURI); }
private SAMLDocumentHolder getSAMLDocumentHolder(String samlResponse) throws ParsingException, ConfigurationException, ProcessingException { SAML2Response saml2Response = new SAML2Response(); InputStream dataStream = null; if (isPostBinding()) { // deal with SAML response from IDP dataStream = PostBindingUtil.base64DecodeAsStream(samlResponse); } else { // deal with SAML response from IDP dataStream = RedirectBindingUtil.base64DeflateDecode(samlResponse); } try { saml2Response.getSAML2ObjectFromStream(dataStream); } catch (ProcessingException pe) { logger.samlResponseFromIDPParsingFailed(); throw pe; } catch (ParsingException pe) { logger.samlResponseFromIDPParsingFailed(); throw pe; } return saml2Response.getSamlDocumentHolder(); } }
SAML2Response saml2Response = new SAML2Response(); sp.setIssuer(art.getIssuer().getValue()); sp.setAuthnRequestType(art); responseType = saml2Response.createResponseType(id, sp, idp, issuerHolder); samlResponseDocument = saml2Response.convert(responseType);
ResponseType responseType = createResponseType(ID, issuerInfo, assertion);
ResponseType responseType = null; SAML2Response saml2Response = new SAML2Response(); sp.setResponseDestinationURI(responseURL); responseType = saml2Response.createResponseType(id); responseType.setStatus(JBossSAMLAuthnResponseFactory.createStatusType(status)); StringWriter sw = new StringWriter(); try { saml2Response.marshall(responseType, sw); } catch (ProcessingException e) { logger.trace(e); samlResponse = saml2Response.convert(responseType); } catch (Exception e) { logger.trace(e);
/** * Sign an assertion whose id value is provided in the response type * * @param response * @param idValueOfAssertion * @param keypair * @param referenceURI * * @return * * @throws ParserConfigurationException * @throws TransformerException * @throws TransformerFactoryConfigurationError * @throws XPathException * @throws XMLSignatureException * @throws MarshalException * @throws GeneralSecurityException */ public Document sign(ResponseType response, String idValueOfAssertion, KeyPair keypair, String referenceURI) throws ParserConfigurationException, XPathException, TransformerFactoryConfigurationError, TransformerException, GeneralSecurityException, MarshalException, XMLSignatureException { SAML2Response saml2Response = new SAML2Response(); Document doc = saml2Response.convert(response); doc.normalize(); Node theSibling = getNextSiblingOfIssuer(doc); if (theSibling != null) { this.sibling = theSibling; } return sign(doc, idValueOfAssertion, keypair, referenceURI); }
private SAMLDocumentHolder getSAMLDocumentHolder(String samlResponse) throws ParsingException, ConfigurationException, ProcessingException { SAML2Response saml2Response = new SAML2Response(); InputStream dataStream = null; if (isPostBinding()) { // deal with SAML response from IDP dataStream = PostBindingUtil.base64DecodeAsStream(samlResponse); } else { // deal with SAML response from IDP dataStream = RedirectBindingUtil.base64DeflateDecode(samlResponse); } try { saml2Response.getSAML2ObjectFromStream(dataStream); } catch (ProcessingException pe) { logger.samlResponseFromIDPParsingFailed(); throw pe; } catch (ParsingException pe) { logger.samlResponseFromIDPParsingFailed(); throw pe; } return saml2Response.getSamlDocumentHolder(); } }
ResponseType responseType = createResponseType(ID, issuerInfo, assertion);
ResponseType responseType = null; SAML2Response saml2Response = new SAML2Response(); sp.setResponseDestinationURI(assertionConsumerURL); sp.setRequestID(requestID); responseType = saml2Response.createResponseType(id, sp, idp, issuerHolder); try saml2Response.marshall(responseType, sw); samlResponseDocument = saml2Response.convert(responseType);