Package org.jboss.identity.federation.core.saml.v2.util

Examples of org.jboss.identity.federation.core.saml.v2.util.AssertionUtil


            throw new RuntimeException("Request Security Token node not found");
        
         jaxbRST = (JAXBElement<RequestSecurityTokenType>) binder.unmarshal(rst);

         RequestSecurityTokenType rstt = jaxbRST.getValue();
         holders.set(new SAMLDocumentHolder(rstt, document));
         return new RequestSecurityToken(rstt);
      }
      catch (JAXBException e)
      {
         throw new ParsingException(e);
View Full Code Here


            {
               SAML2Response saml2Response = new SAML2Response();
              
               ResponseType responseType = saml2Response.getResponseType(is);
              
               SAMLDocumentHolder samlDocumentHolder = saml2Response.getSamlDocumentHolder();
              
               boolean validSignature = this.verifySignature(samlDocumentHolder);
              
               if(validSignature == false)
                  throw new IssuerNotTrustedException("Signature in saml document is invalid");
View Full Code Here

      try
      {
         Binder<Node> binder = getBinder();
         JAXBElement<SAML2Object> jaxbAuthnRequestType = (JAXBElement<SAML2Object>) binder.unmarshal(samlDocument);
         SAML2Object requestType = jaxbAuthnRequestType.getValue();
         samlDocumentHolder = new SAMLDocumentHolder(requestType, samlDocument);
         return requestType;
      }
      catch (JAXBException e)
      {
         throw new ParsingException(e);
View Full Code Here

      try
      {
         Binder<Node> binder = getBinder();
         JAXBElement<RequestAbstractType> jaxbAuthnRequestType = (JAXBElement<RequestAbstractType>) binder.unmarshal(samlDocument);
         RequestAbstractType requestType = jaxbAuthnRequestType.getValue();
         samlDocumentHolder = new SAMLDocumentHolder(requestType, samlDocument);
         return requestType;
      }
      catch (JAXBException e)
      {
         throw new ParsingException(e);
View Full Code Here

    * @return a {@code Source} instance representing the marshalled response.
    * @throws WebServiceException Any exception encountered in handling token
    */
   protected Source handleTokenRequest(RequestSecurityToken request)
   {
      SAMLDocumentHolder holder = WSTrustJAXBFactory.getInstance().getSAMLDocumentHolderOnThread();
     
      /**
       * The RST Document is very important for XML Signatures
       */
      request.setRSTDocument(holder.getSamlDocument());
     
      if(this.config == null)
         try
         {
            if(logger.isInfoEnabled())
View Full Code Here

      try
      {
         Binder<Node> binder = getBinder();
         JAXBElement<ResponseType> jaxbResponseType = (JAXBElement<ResponseType>) binder.unmarshal(samlResponseDocument);
         ResponseType responseType = jaxbResponseType.getValue();
         samlDocumentHolder = new SAMLDocumentHolder(responseType, samlResponseDocument);
         return responseType;
      }
      catch (JAXBException e)
      {
         throw new ParsingException(e);
View Full Code Here

      try
      {
         Binder<Node> binder = getBinder();
         JAXBElement<SAML2Object> saml2Object = (JAXBElement<SAML2Object>) binder.unmarshal(samlResponseDocument);
         SAML2Object responseType = saml2Object.getValue();
         samlDocumentHolder = new SAMLDocumentHolder(responseType, samlResponseDocument);
         return responseType;
      }
      catch (JAXBException e)
      {
         throw new ParsingException(e);
View Full Code Here

            throw new RuntimeException("Request Security Token node not found");
        
         jaxbRST = (JAXBElement<RequestSecurityTokenType>) binder.unmarshal(rst);

         RequestSecurityTokenType rstt = jaxbRST.getValue();
         holders.set(new SAMLDocumentHolder(rstt, document));
         return new RequestSecurityToken(rstt);
      }
      catch (JAXBException e)
      {
         throw new ParsingException(e);
View Full Code Here

    * @return a {@code Source} instance representing the marshalled response.
    * @throws WebServiceException Any exception encountered in handling token
    */
   protected Source handleTokenRequest(RequestSecurityToken request)
   {
      SAMLDocumentHolder holder = WSTrustJAXBFactory.getInstance().getSAMLDocumentHolderOnThread();
     
      /**
       * The RST Document is very important for XML Signatures
       */
      request.setRSTDocument(holder.getSamlDocument());
     
      if(this.config == null)
         try
         {
            this.config = this.getConfiguration();
View Full Code Here

     
      AssertionType assertion = (AssertionType)assertions.get(0);
      //Check for validity of assertion
      boolean expiredAssertion = AssertionUtil.hasExpired(assertion);
      if(expiredAssertion)
         throw new AssertionExpiredException();
     
      SubjectType subject = assertion.getSubject();
      JAXBElement<NameIDType> jnameID = (JAXBElement<NameIDType>) subject.getContent().get(0);
      NameIDType nameID = jnameID.getValue();
      String userName = nameID.getValue();
View Full Code Here

TOP

Related Classes of org.jboss.identity.federation.core.saml.v2.util.AssertionUtil

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.