Package org.jboss.identity.federation.core.exceptions

Examples of org.jboss.identity.federation.core.exceptions.ProcessingException


         {
            statusResponse.setIssueInstant(XMLTimeUtil.getIssueInstant());
         }
         catch (ConfigurationException e)
         {
            throw new ProcessingException(e);
         }
         statusResponse.setInResponseTo(logOutRequest.getID());
         statusResponse.setID(IDGenerator.create("ID_"));
        
         statusResponse.setIssuer(request.getIssuer());
        
         SAML2Response saml2Response = new SAML2Response();
         try
         {
            response.setResultingDocument(saml2Response.convert(statusResponse));
         }
         catch(Exception je)
         {
            throw new ProcessingException(je);
         }
        
         response.setRelayState(relayState);
         response.setDestination(logOutRequest.getIssuer().getValue());
      }
View Full Code Here


           
            response.setResultingDocument(samlRequest.convert(authn));
         }
         catch (Exception e)
         {
            throw new ProcessingException(e);
        
      }
View Full Code Here

         {
            expiredAssertion = AssertionUtil.hasExpired(assertion);
         }
         catch (ConfigurationException e)
         {
           throw new ProcessingException(e);
         }
         if(expiredAssertion)
         {
            throw new ProcessingException("Assertion has expired");
         }
        
         SubjectType subject = assertion.getSubject();
         JAXBElement<NameIDType> jnameID = (JAXBElement<NameIDType>) subject.getContent().get(0);
         NameIDType nameID = jnameID.getValue();
View Full Code Here

      {
         samlMessage = PostBindingUtil.base64Encode(DocumentUtil.getDocumentAsString(samlDocument));
      }
      catch (TransformerFactoryConfigurationError e)
      {
         throw new ProcessingException(e);
      }
      catch (TransformerException e)
      {
         throw new ProcessingException(e);
     
      PostBindingUtil.sendPost(new DestinationInfoHolder(destination, samlMessage, relayState),
             response, true);
   }
View Full Code Here

               }
            }
         }
         catch (Exception e)
         {  
            throw new ProcessingException(new IssuerNotTrustedException(e.getLocalizedMessage(),e));
         }
      }
View Full Code Here

               }
            }
         }
         catch (Exception e)
         {  
            throw new ProcessingException(new IssuerNotTrustedException(e.getLocalizedMessage(),e));
         }
      }
View Full Code Here

        
         ServletContext servletCtx = httpContext.getServletContext();
         IdentityServer server = (IdentityServer)servletCtx.getAttribute("IDENTITY_SERVER");
        
         if(server == null)
            throw new ProcessingException("Identity Server not found");
        
         String sessionID = httpSession.getId();
        
         String statusIssuer = statusResponseType.getIssuer().getValue();
         server.stack().deRegisterTransitParticipant(sessionID, statusIssuer);
        
         String nextParticipant = this.getParticipant(server, sessionID, relayState);
         if(nextParticipant == null || nextParticipant.equals(relayState))
         {
            //we are done with logout
           
            //TODO: check the in transit map for partial logouts

            try
            {
               generateSuccessStatusResponseType(statusResponseType.getInResponseTo(),
                     request, response, relayState);
            }
            catch (Exception e)
            {
               throw new ProcessingException(e);
            }
         }
         else
         {
            //Put the participant in transit mode
            server.stack().registerTransitParticipant(sessionID, nextParticipant);
                     
            //send logout request to participant with relaystate to orig
            response.setRelayState(relayState);
           
            response.setDestination(nextParticipant);
           
            SAML2Request saml2Request = new SAML2Request();
            try
            {
               LogoutRequestType lort = saml2Request.createLogoutRequest(request.getIssuer().getValue());
               response.setResultingDocument(saml2Request.convert(lort));
            }
            catch(Exception e)
            {
               throw new ProcessingException(e);
            }
         }
      }
View Full Code Here

           
            ServletContext servletCtx = httpContext.getServletContext();
            IdentityServer server = (IdentityServer)servletCtx.getAttribute("IDENTITY_SERVER");
           
            if(server == null)
               throw new ProcessingException("Identity Server not found");
           
            String originalIssuer = (relayState == null) ? issuer : relayState;
           
            String participant = this.getParticipant(server, sessionID, originalIssuer);
          
            if(participant == null || participant.equals(originalIssuer))
            {
               //All log out is done
               session.invalidate();
               server.stack().pop(sessionID);
              
               generateSuccessStatusResponseType(logOutRequest.getID(),
                     request, response, originalIssuer);
            }
            else
            {
               //Put the participant in transit mode
               server.stack().registerTransitParticipant(sessionID, participant);
              
               if(relayState == null)
                  relayState = originalIssuer;
              
               //send logout request to participant with relaystate to orig
               response.setRelayState(originalIssuer);
              
               response.setDestination(participant);
              
              
               LogoutRequestType lort = saml2Request.createLogoutRequest(request.getIssuer().getValue());
               response.setResultingDocument(saml2Request.convert(lort));
            }
         }
         catch(ParserConfigurationException pe)
         {
            throw new ProcessingException(pe);
         }
         catch(ConfigurationException pe)
         {
            throw new ProcessingException(pe);
         }
         catch(JAXBException pe)
         {
            throw new ProcessingException(pe);
         }
         catch(IOException pe)
         {
            throw new ProcessingException(pe);
         }
         catch(SAXException pe)
         {
            throw new ProcessingException(pe);
         }
         return;
      }
View Full Code Here

            SAML2Response saml2Response = new SAML2Response();
            response.setResultingDocument(saml2Response.convert(statusResponse));
         }
         catch(JAXBException je)
         {
            throw new ProcessingException(je);
         }
        
         response.setDestination(originalIssuer);
      }
View Full Code Here

        
         return new Result(dt,null);
      }
      catch (JAXBException e)
      {
         throw new ProcessingException(e);
      }
      catch (IOException e)
      {
         throw new ProcessingException(e);
      }
      catch (ConfigurationException e)
      {
         throw new ProcessingException(e);
      }
   }
View Full Code Here

TOP

Related Classes of org.jboss.identity.federation.core.exceptions.ProcessingException

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.