Package org.openxri.saml

Examples of org.openxri.saml.Assertion


    if ((bSigned) && (this.getCertificateChain() != null) && (this.getPrivateKey()!= null)) {

      try {

        Assertion oAssertion = createAssertion(
            xrd.getXmlID(),
            xrd.getProviderID(),
            ((subSegment == null) ? parentQueryName : subSegment.getName()));
        xrd.setSAMLAssertion(oAssertion);
        xrd.sign(this.getPrivateKey());
View Full Code Here


    // create the conditions
    Conditions oConditions = new Conditions();

    // now we can create the true SAML Assertion
    Assertion oXRIAssertion = new Assertion();
    oXRIAssertion.setIssueInstant(DOMUtils.toXMLDateTime(new Date()));
    NameID oIssuer = new NameID(Tags.TAG_ISSUER);
    oIssuer.setValue(this.samlIssuer);
    oXRIAssertion.setIssuer(oIssuer);
    oXRIAssertion.setSubject(oSubject);
    oXRIAssertion.setAttrStatement(oAttrStatement);
    oXRIAssertion.setConditions(oConditions);

    log.debug("Done.");
    return oXRIAssertion;

  } // createAssertion()
View Full Code Here

        || (!xrd.getQuery().equals(sSubsegment))) {
      return false;
    }

    // Must contain a SAML assertion
    Assertion oAssertion = xrd.getSAMLAssertion();
    if (oAssertion == null) {
      return false;
    }

    // Assertion must also be valid
    if (!oAssertion.isValid()) {
      return false;
    }

    // Subject must have correct info
    Subject oSubject = oAssertion.getSubject();
    if (oSubject == null) {
      return false;
    }

    NameID oNameID = oSubject.getNameID();
    if (oNameID == null) {
      return false;
    }

    if (!sSubsegment.equals(oNameID.getValue())) {
      return false;
    }

    if (!sAuthorityID.equals(oNameID.getNameQualifier())) {
      return false;
    }

    // must contain a SAML Attribute statement
    AttributeStatement oAttrStmt = oAssertion.getAttributeStatement();
    if (oAttrStmt == null) {
      return false;
    }

    // Attribute must describe the XML ID reference
View Full Code Here

          (oChild.getNamespaceURI() != null) &&
          oChild.getNamespaceURI().equals(Tags.NS_SAML) &&
          (oChild.getLocalName() != null) &&
          oChild.getLocalName().equals(Tags.TAG_ASSERTION))
      {
        samlAssertion = new Assertion(oChild);
      }
      // Added this code to support extensions in Authority Element
      else
      {
        Vector oVector =
View Full Code Here

    if ((bSigned) && (this.getPrivateKey()!= null)) {

      try {

        Assertion oAssertion = createAssertion(
            xrd.getXmlID(),
            "",
            subSegment.getName());
        xrd.setSAMLAssertion(oAssertion);
        xrd.sign(this.getPrivateKey());
View Full Code Here

    // create the conditions
    Conditions oConditions = new Conditions();

    // now we can create the true SAML Assertion
    Assertion oXRIAssertion = new Assertion();
    oXRIAssertion.setIssueInstant(DOMUtils.toXMLDateTime(new Date()));
    NameID oIssuer = new NameID(Tags.TAG_ISSUER);
    oIssuer.setValue(this.samlIssuer);
    oXRIAssertion.setIssuer(oIssuer);
    oXRIAssertion.setSubject(oSubject);
    oXRIAssertion.setAttrStatement(oAttrStatement);
    oXRIAssertion.setConditions(oConditions);

    log.debug("Done.");
    return oXRIAssertion;

  } // createAssertion()
View Full Code Here

    if ((bSigned) && (this.getCertificateChain() != null) && (this.getPrivateKey()!= null)) {

      try {

        Assertion oAssertion = createAssertion(
            xrd.getXmlID(),
            xrd.getProviderID(),
            ((subSegment == null) ? parentQueryName : subSegment.getName()));
        xrd.setSAMLAssertion(oAssertion);
        xrd.sign(this.getPrivateKey());
View Full Code Here

    // create the conditions
    Conditions oConditions = new Conditions();

    // now we can create the true SAML Assertion
    Assertion oXRIAssertion = new Assertion();
    oXRIAssertion.setIssueInstant(DOMUtils.toXMLDateTime(new Date()));
    NameID oIssuer = new NameID(Tags.TAG_ISSUER);
    oIssuer.setValue(this.samlIssuer);
    oXRIAssertion.setIssuer(oIssuer);
    oXRIAssertion.setSubject(oSubject);
    oXRIAssertion.setAttrStatement(oAttrStatement);
    oXRIAssertion.setConditions(oConditions);

    log.debug("Done.");
    return oXRIAssertion;

  } // createAssertion()
View Full Code Here

            {
                // TODO: make more efficient by manipulating DOM directly and not
                // repopulating objects
                XRD oDesc =
                    XRD.constructXRIDescriptor(sDescStr, false);
                Assertion oAssertion =
                    createAssertion(sNewXMLID.toString(), sID, sSubsegment);
                oDesc.setSAMLAssertion(oAssertion);
                oDesc.sign(moPrivateKey);
                Element oElem = oDesc.getDOM();
                oEnv.setDescriptor(DOMUtils.toString(oElem, false, true));
View Full Code Here

        // create the conditions
        Conditions oConditions = new Conditions();

        // now we can create the true SAML Assertion
        Assertion oXRIAssertion = new Assertion();
        oXRIAssertion.setIssueInstant(DOMUtils.toXMLDateTime(new Date()));
        NameID oIssuer = new NameID(Tags.TAG_ISSUER);
        oIssuer.setValue(msIssuer);
        oXRIAssertion.setIssuer(oIssuer);
        oXRIAssertion.setSubject(oSubject);
        oXRIAssertion.setAttrStatement(oAttrStatement);
        oXRIAssertion.setConditions(oConditions);

        return oXRIAssertion;

    } // createAssertion()
View Full Code Here

TOP

Related Classes of org.openxri.saml.Assertion

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.