Package org.jboss.identity.federation.ws.trust

Examples of org.jboss.identity.federation.ws.trust.ValidateTargetType


    */
   @SuppressWarnings("unchecked")
   public void validateToken(WSTrustRequestContext context) throws WSTrustException
   {
      // get the SAML assertion that must be validated.
      ValidateTargetType validateTarget = context.getRequestSecurityToken().getValidateTarget();
      if(validateTarget == null)
         throw new WSTrustException("Invalid validate message: missing required ValidateTarget");
    
      String code = WSTrustConstants.STATUS_CODE_VALID;
      String reason = "SAMLV2.0 Assertion successfuly validated";
     
      AssertionType assertion = null;
     
      Object assertionObj = validateTarget.getAny();
      if(assertionObj instanceof JAXBElement)
      {
         JAXBElement<AssertionType> assertionType = (JAXBElement<AssertionType>) validateTarget.getAny();
         assertion = assertionType.getValue();           
      }
      else if(assertionObj instanceof Element)
      {
         Element assertionElement = (Element) assertionObj;
View Full Code Here


    * @see org.jboss.identity.federation.api.wstrust.SecurityTokenProvider#validateToken(org.jboss.identity.federation.api.wstrust.WSTrustRequestContext)
    */
   public void validateToken(WSTrustRequestContext context) throws WSTrustException
   {
      // get the SAML assertion that must be validated.
      ValidateTargetType validateTarget = context.getRequestSecurityToken().getValidateTarget();
      if(validateTarget == null)
         throw new WSTrustException("Invalid validate message: missing required ValidateTarget");
      Element assertionElement = (Element) validateTarget.getAny();
     
      String code = WSTrustConstants.STATUS_CODE_VALID;
      String reason = "SAMLV2.0 Assertion successfuly validated";
     
      if(!this.isAssertion(assertionElement))
View Full Code Here

        RequestSecurityToken request = new RequestSecurityToken();
        request.setContext("context");

        request.setTokenType(URI.create(WSTrustConstants.STATUS_TYPE));
        request.setRequestType(URI.create(WSTrustConstants.VALIDATE_REQUEST));
        ValidateTargetType validateTarget = new ValidateTargetType();
        validateTarget.setAny(token);
        request.setValidateTarget(validateTarget);

        WSTrustJAXBFactory jaxbFactory = WSTrustJAXBFactory.getInstance();

        DOMSource requestSource = (DOMSource) jaxbFactory.marshallRequestSecurityToken(request);
View Full Code Here

   {
      if (logger.isTraceEnabled())
         logger.trace("SAML V2.0 token validation started");
     
      // get the SAML assertion that must be validated.
      ValidateTargetType validateTarget = context.getRequestSecurityToken().getValidateTarget();
      if(validateTarget == null)
         throw new WSTrustException("Invalid validate message: missing required ValidateTarget");
    
      String code = WSTrustConstants.STATUS_CODE_VALID;
      String reason = "SAMLV2.0 Assertion successfuly validated";
     
      AssertionType assertion = null;
     
      Object assertionObj = validateTarget.getAny();
      if(assertionObj instanceof JAXBElement)
      {
         JAXBElement<AssertionType> assertionType = (JAXBElement<AssertionType>) validateTarget.getAny();
         assertion = assertionType.getValue();           
      }
      else if(assertionObj instanceof Element)
      {
         Element assertionElement = (Element) assertionObj;
View Full Code Here

TOP

Related Classes of org.jboss.identity.federation.ws.trust.ValidateTargetType

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.