Package secParser

Examples of secParser.SecurityPolicyToken


   *            The token that will hold the child tokens.
   * @throws NoSuchMethodException
   */
  private void initializeSupportingTokens(SecurityPolicyToken spt)
      throws NoSuchMethodException {
    SecurityPolicyToken tmpSpt = SecurityPolicy.x509Token.copy();
    tmpSpt.setProcessTokenMethod(new X509TokenProcessor());
    spt.setChildToken(tmpSpt);
   
    tmpSpt = SecurityPolicy.usernameToken.copy();
    tmpSpt.setProcessTokenMethod(new UsernameTokenProcessor());
    spt.setChildToken(tmpSpt);

    tmpSpt = SecurityPolicy.algorithmSuite.copy();
    tmpSpt.setProcessTokenMethod(new AlgorithmSuiteProcessor());
    spt.setChildToken(tmpSpt);

    SignedPartsElementsProcessor spep = new SignedPartsElementsProcessor();
    tmpSpt = SecurityPolicy.signedParts.copy();
    tmpSpt.setProcessTokenMethod(spep);
    spt.setChildToken(tmpSpt);
   
    tmpSpt = SecurityPolicy.signedElements.copy();
    tmpSpt.setProcessTokenMethod(spep);   
    spt.setChildToken(tmpSpt);

    EncryptedPartsElementsProcessor epep = new EncryptedPartsElementsProcessor();
    tmpSpt = SecurityPolicy.encryptedParts.copy();
    tmpSpt.setProcessTokenMethod(epep);
    spt.setChildToken(tmpSpt);
   
    tmpSpt = SecurityPolicy.encryptedElements.copy();
    tmpSpt.setProcessTokenMethod(epep);
    spt.setChildToken(tmpSpt);

  }
View Full Code Here


  public Object doSupportingTokens(SecurityProcessorContext spc) {
    System.out.println("Processing "
        + spc.readCurrentSecurityToken().getTokenName() + ": "
        + SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
    SecurityPolicyToken spt = spc.readCurrentSecurityToken();

    switch (spc.getAction()) {

    case SecurityProcessorContext.START:
      if (!initializedSupportingTokens) {
View Full Code Here

   *            The token that will hold the child tokens.
   * @throws NoSuchMethodException
   */
  public void initializeTrust10(SecurityPolicyToken spt)
      throws NoSuchMethodException {
    SecurityPolicyToken tmpSpt = SecurityPolicy.mustSupportClientChallenge
        .copy();
    tmpSpt.setProcessTokenMethod(this);
    spt.setChildToken(tmpSpt);

    tmpSpt = SecurityPolicy.mustSupportServerChallenge.copy();
    tmpSpt.setProcessTokenMethod(this);
    spt.setChildToken(tmpSpt);

    tmpSpt = SecurityPolicy.requireClientEntropy.copy();
    tmpSpt.setProcessTokenMethod(this);
    spt.setChildToken(tmpSpt);

    tmpSpt = SecurityPolicy.requireServerEntropy.copy();
    tmpSpt.setProcessTokenMethod(this);
    spt.setChildToken(tmpSpt);

    tmpSpt = SecurityPolicy.mustSupportIssuedTokens.copy();
    tmpSpt.setProcessTokenMethod(this);
    spt.setChildToken(tmpSpt);
  }
View Full Code Here

  public Object doTrust10(SecurityProcessorContext spc) {
    System.out.println("Processing "
        + spc.readCurrentSecurityToken().getTokenName() + ": "
        + SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);

    SecurityPolicyToken spt = spc.readCurrentSecurityToken();

    switch (spc.getAction()) {

    case SecurityProcessorContext.START:
      if (!initializedTrust10) {
View Full Code Here

   *            The token that will hold the child tokens.
   * @throws NoSuchMethodException
   */
  private void initializeEndorsingSupportingTokens(SecurityPolicyToken spt)
      throws NoSuchMethodException {
    SecurityPolicyToken tmpSpt = SecurityPolicy.x509Token.copy();
    tmpSpt.setProcessTokenMethod(new X509TokenProcessor());
    spt.setChildToken(tmpSpt);
   
    tmpSpt = SecurityPolicy.usernameToken.copy();
    tmpSpt.setProcessTokenMethod(new UsernameTokenProcessor());
    spt.setChildToken(tmpSpt);

    tmpSpt = SecurityPolicy.algorithmSuite.copy();
    tmpSpt.setProcessTokenMethod(new AlgorithmSuiteProcessor());
    spt.setChildToken(tmpSpt);

    SignedPartsElementsProcessor spep = new SignedPartsElementsProcessor();
    tmpSpt = SecurityPolicy.signedParts.copy();
    tmpSpt.setProcessTokenMethod(spep);
    spt.setChildToken(tmpSpt);
   
    tmpSpt = SecurityPolicy.signedElements.copy();
    tmpSpt.setProcessTokenMethod(spep);   
    spt.setChildToken(tmpSpt);

    EncryptedPartsElementsProcessor epep = new EncryptedPartsElementsProcessor();
    tmpSpt = SecurityPolicy.encryptedParts.copy();
    tmpSpt.setProcessTokenMethod(epep);
    spt.setChildToken(tmpSpt);
   
    tmpSpt = SecurityPolicy.encryptedElements.copy();
    tmpSpt.setProcessTokenMethod(epep);
    spt.setChildToken(tmpSpt);

  }
View Full Code Here

  public Object doEndorsingSupportingTokens(SecurityProcessorContext spc) {
    System.out.println("Processing "
        + spc.readCurrentSecurityToken().getTokenName() + ": "
        + SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
    SecurityPolicyToken spt = spc.readCurrentSecurityToken();

    switch (spc.getAction()) {

    case SecurityProcessorContext.START:
      if (!initializedEndorsingSupportingTokens) {
View Full Code Here

   *            The token that will hold the child tokens.
   * @throws NoSuchMethodException
   */
  private void initializeSignedParts(SecurityPolicyToken spt)
      throws NoSuchMethodException {
    SecurityPolicyToken tmpSpt = SecurityPolicy.body.copy();
    tmpSpt.setProcessTokenMethod(this);
    spt.setChildToken(tmpSpt);

    tmpSpt = SecurityPolicy.header.copy();
    tmpSpt.setProcessTokenMethod(this);
    spt.setChildToken(tmpSpt);

  }
View Full Code Here

   *            The token that will hold the child tokens.
   * @throws NoSuchMethodException
   */
  private void initializeSignedElements(SecurityPolicyToken spt)
      throws NoSuchMethodException {
    SecurityPolicyToken tmpSpt = SecurityPolicy.xPath.copy();
    tmpSpt.setProcessTokenMethod(this);
    spt.setChildToken(tmpSpt);
  }
View Full Code Here

  public Object doSignedParts(SecurityProcessorContext spc) {
    System.out.println("Processing "
        + spc.readCurrentSecurityToken().getTokenName() + ": "
        + SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);

    SecurityPolicyToken spt = spc.readCurrentSecurityToken();

    switch (spc.getAction()) {

    case SecurityProcessorContext.START:
      if (!initializedSignedParts) {
        try {
          initializeSignedParts(spt);
          initializedSignedParts = true;
        } catch (NoSuchMethodException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
          return new Boolean(false);
        }
      }
      System.out.println(spt.getTokenName());
      PrimitiveAssertion pa = spc.getAssertion();
      String text = pa.getStrValue();
      if (text != null) {
        text = text.trim();
        System.out.println("Value: '" + text.toString() + "'");
View Full Code Here

  public Object doSignedElements(SecurityProcessorContext spc) {
    System.out.println("Processing "
        + spc.readCurrentSecurityToken().getTokenName() + ": "
        + SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);

    SecurityPolicyToken spt = spc.readCurrentSecurityToken();

    switch (spc.getAction()) {

    case SecurityProcessorContext.START:
      if (!initializedSignedElements) {
        try {
          initializeSignedElements(spt);
          initializedSignedElements = true;
        } catch (NoSuchMethodException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
          return new Boolean(false);
        }
      }
      System.out.println(spt.getTokenName());
      PrimitiveAssertion pa = spc.getAssertion();
      String text = pa.getStrValue();
      if (text != null) {
        text = text.trim();
        System.out.println("Value: '" + text.toString() + "'");
View Full Code Here

TOP

Related Classes of secParser.SecurityPolicyToken

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.