Examples of TokenContext


Examples of org.apache.wss4j.stax.validate.TokenContext

        TimestampValidator timestampValidator = wssSecurityProperties.getValidator(WSSConstants.TAG_wsu_Timestamp);
        if (timestampValidator == null) {
            timestampValidator = new TimestampValidatorImpl();
        }
        TokenContext tokenContext = new TokenContext(wssSecurityProperties, wssecurityContextInbound, xmlSecEvents, elementPath);
        timestampValidator.validate(timestampType, tokenContext);

        TimestampSecurityEvent timestampSecurityEvent = new TimestampSecurityEvent();
        if (timestampType.getCreated() != null) {
            try {
View Full Code Here

Examples of org.apache.wss4j.stax.validate.TokenContext

            subjectSecurityToken = null;
        }

        final List<XMLSecEvent> xmlSecEvents = getResponsibleXMLSecEvents(eventQueue, index);
        final List<QName> elementPath = getElementPath(eventQueue);
        final TokenContext tokenContext = new TokenContext(wssSecurityProperties, wsInboundSecurityContext, xmlSecEvents, elementPath);

        //jdk 1.6 compiler bug? http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6302954
        //type parameters of <T>T cannot be determined; no unique maximal instance exists for type variable T with
        // upper bounds org.apache.wss4j.stax.securityToken.SamlSecurityToken,
        // org.apache.wss4j.stax.securityToken.SamlSecurityToken,
View Full Code Here

Examples of org.apache.wss4j.stax.validate.TokenContext

        final WSInboundSecurityContext wsInboundSecurityContext = (WSInboundSecurityContext) inputProcessorChain.getSecurityContext();
        final WSSSecurityProperties wssSecurityProperties = (WSSSecurityProperties) securityProperties;
        final List<QName> elementPath = getElementPath(eventQueue);
        final List<XMLSecEvent> xmlSecEvents = getResponsibleXMLSecEvents(eventQueue, index);

        final TokenContext tokenContext = new TokenContext(wssSecurityProperties, wsInboundSecurityContext, xmlSecEvents, elementPath);

        BinarySecurityTokenValidator binarySecurityTokenValidator =
                wssSecurityProperties.getValidator(WSSConstants.TAG_wsse_BinarySecurityToken);
        if (binarySecurityTokenValidator == null) {
            binarySecurityTokenValidator = new BinarySecurityTokenValidatorImpl();
View Full Code Here

Examples of org.apache.wss4j.stax.validate.TokenContext

        }

        final WSInboundSecurityContext wsInboundSecurityContext = (WSInboundSecurityContext) inputProcessorChain.getSecurityContext();
        final List<QName> elementPath = getElementPath(eventQueue);
       
        final TokenContext tokenContext = new TokenContext(wssSecurityProperties, wsInboundSecurityContext, xmlSecEvents, elementPath);

        UsernameTokenValidator usernameTokenValidator =
                wssSecurityProperties.getValidator(WSSConstants.TAG_wsse_UsernameToken);
        if (usernameTokenValidator == null) {
            usernameTokenValidator = new UsernameTokenValidatorImpl();
View Full Code Here

Examples of org.apache.wss4j.stax.validate.TokenContext

        final WSInboundSecurityContext wsInboundSecurityContext = (WSInboundSecurityContext) inputProcessorChain.getSecurityContext();
        final WSSSecurityProperties wssSecurityProperties = (WSSSecurityProperties) securityProperties;
        final List<XMLSecEvent> xmlSecEvents = getResponsibleXMLSecEvents(eventQueue, index);
        final List<QName> elementPath = getElementPath(eventQueue);

        final TokenContext tokenContext = new TokenContext(wssSecurityProperties, wsInboundSecurityContext, xmlSecEvents, elementPath);

        SecurityContextTokenValidator securityContextTokenValidator = wssSecurityProperties.getValidator(elementName);
        if (securityContextTokenValidator == null) {
            securityContextTokenValidator = new SecurityContextTokenValidatorImpl();
        }
View Full Code Here

Examples of org.openbp.server.context.TokenContext

    startValue = 99;
    inputParams.put("NumValue", new Integer(startValue));

    // Create the process context and start the process
    TokenContext token = testCase.createToken();
    token.setDebuggerId("Deb1");
    token.createProcessVariable("externalValue", true);
    token.setProcessVariableValue("externalValue", new Integer(199));
    processFacade.startToken(token, STARTREF, inputParams);

    Object tokenId = token.getId();

    // Note: This might also be done by some worker thread; for the test case, we do it right here.
    processFacade.executePendingContextsInThisThread();

    return tokenId;
View Full Code Here

Examples of org.openbp.server.context.TokenContext

  }

  @Transactional(propagation = Propagation.REQUIRED)
  public void doCheckStart(TestCaseBase testCase, final Object tokenId)
  {
    TokenContext token = processFacade.getTokenById(tokenId);

    // The first workflow node made us stop here
    testCase.assertCurrentNode(token, "Workflow");
  }
View Full Code Here

Examples of org.openbp.server.context.TokenContext

  }

  @Transactional(propagation = Propagation.REQUIRED)
  public void doWorkflowTask(TestCaseBase testCase, final Object tokenId)
  {
    TokenContext token = processFacade.getTokenById(tokenId);

    // Check the process variables of the token context
    Object p = token.getProcessVariableValue("globalObject");
    assertTrue(p instanceof PersistedComplexParam);
    PersistedComplexParam rcp = (PersistedComplexParam) p;
    int nRet = rcp.getResult();
    assertEquals(startValue + 1, nRet);

    // The any workflow tasks that are associated with our process.
    WorkflowTaskCriteria criteria = new WorkflowTaskCriteria();
    criteria.setTokenContext(token);
    Iterator it = processFacade.getworkflowTasks(criteria);
    assertTrue(it.hasNext());
    WorkflowTask task = (WorkflowTask) it.next();

    TokenContext taskToken = task.getTokenContext();

    // Check the process variables of the token context
    Object p2 = taskToken.getProcessVariableValue("globalObject");
    assertTrue(p2 instanceof PersistedComplexParam);
    PersistedComplexParam rcp2 = (PersistedComplexParam) p2;
    int nRet2 = rcp2.getResult();
    assertEquals(startValue + 1, nRet2);
View Full Code Here

Examples of org.openbp.server.context.TokenContext

  }

  @Transactional(propagation = Propagation.REQUIRED)
  public void doFinish(TestCaseBase testCase, final Object tokenId)
  {
    TokenContext token = processFacade.getTokenById(tokenId);

    // Note: This should be done by some worker thread; for the test case, we do it right here.
    processFacade.executePendingContextsInThisThread();

    // Token should be at the end of the workflow
View Full Code Here

Examples of org.openbp.server.context.TokenContext

  @Transactional(propagation = Propagation.REQUIRED)
  public void doCheckFinish(TestCaseBase testCase, final Object tokenId)
  {
    // Token should have been removed from the database
    TokenContext token = processFacade.getTokenById(tokenId);
    assertNull(token);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.