How to use opensaml v3? There is little to no documentation and v2 is EOL
NickName:gauravphoenix Ask DateTime:2016-11-12T10:30:34

How to use opensaml v3? There is little to no documentation and v2 is EOL

Is there an end to end example of using Open SAML library v3? I can't find any documentation and as per https://wiki.shibboleth.net/confluence/display/OpenSAML/Home the v2 is EOL.

I'm using following code to get SAML assertion-

  private UnmarshallerFactory unmarshallerFactory;
  private DocumentBuilder docBuilder;

  @PostConstruct
  public void init() {

    try {
      InitializationService.initialize();
      DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
      documentBuilderFactory.setNamespaceAware(true);
      docBuilder = documentBuilderFactory.newDocumentBuilder();
      unmarshallerFactory = XMLObjectProviderRegistrySupport.getUnmarshallerFactory();
    } catch (Exception e){
      logger.error("Error: ",e);
    }
  }

  public Assertion getSamlAssertion(String samlResponse)
      throws IOException, XMLParserException, UnmarshallingException, SAXException {

    Document document = docBuilder.parse(new StringInputStream(samlResponse));

    Element element = document.getDocumentElement();
    Unmarshaller unmarshaller = unmarshallerFactory.getUnmarshaller(element);
    XMLObject responseXmlObj = unmarshaller.unmarshall(element);
    Response response = (Response) responseXmlObj;
    return response.getAssertions().get(0);

  }

My POM-

         <dependency>
            <groupId>org.opensaml</groupId>
            <artifactId>opensaml-core</artifactId>
            <version>3.2.0</version>
        </dependency>


        <dependency>
            <groupId>org.opensaml</groupId>
            <artifactId>opensaml-saml-api</artifactId>
            <version>3.2.0</version>
        </dependency>

The problem is that I am getting null for unmarshaller . I've verified that the samlResponse is valid

Copyright Notice:Content Author:「gauravphoenix」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/40558996/how-to-use-opensaml-v3-there-is-little-to-no-documentation-and-v2-is-eol

More about “How to use opensaml v3? There is little to no documentation and v2 is EOL” related questions

How to use opensaml v3? There is little to no documentation and v2 is EOL

Is there an end to end example of using Open SAML library v3? I can't find any documentation and as per https://wiki.shibboleth.net/confluence/display/OpenSAML/Home the v2 is EOL. I'm using follo...

Show Detail

OpenSaml3 Documentation

Does anyone know if there is any documentation for OpenSaml3 anywhere? Paid or otherwise? I know there used to be a $15 book available, but I believe that only covers OpenSaml2. I know this will

Show Detail

How to submit OpenSaml response?

I'm building a org.opensaml.saml.saml2.core.Response with openSAML v3.2.0. I've the signed the response and would like to submit it. I tried following openSAML book (A Guide to OpenSAML v3) but it...

Show Detail

Error/Exception while marshalling signed and encrypted response OpenSAML v3

I have been using OpenSaml V2 for a while, which has been working well, and I recently started the migration. Due to the lack of information, even from the OpenSaml V3 book I have recently purchase...

Show Detail

How to handle SAML v2 response using OpenSAML in RestEasy service

I have read about how SAML v2 is working from this link. I see that I require an Assertion Consumer Service URL that will receive the SAML v2 response. Currently, the URL I provide is a RESTEasy

Show Detail

Choosing Youtube API v3 vs v2 for Python GUI application

I am looking into writing a Python GUI app to make use of the Youtube API. This app intends to gather meta data and visualize the results in a variety of methods, however, I am unsure as to which A...

Show Detail

Generating OpenSaml MetaData for a SP

I am attempting to implements SSO using SAML2, and my application is multi-tenant'ed and acting as a SP. I am currently working on generating the SP metadata but I am a little stuck on the crypto ...

Show Detail

Accessing Python V2 packages on Pypi after Python V2 EOL

I'm trying to install a Python v2 package (yes, EOL, I know) and when when I do a pip install bezier) I get a message that hints that the other side is in Python V3: &gt;&gt; pip2 install --user b...

Show Detail

Rancher v3 Api Documentation not available

With the release of version 2.x of rancher we started using v3 of the Apis but to my despair there is no proper documentation for the apis. If we visit the Rancher Documentation Page https://ranch...

Show Detail

v2 to v3 Google Maps wrapper API to test old application

Let me first state that I have tried to get the answer to this question from my Google account representative. After trying to get an answer for several weeks, he emailed me and told me to post this

Show Detail