Examples of NameIDType


Examples of org.jboss.identity.federation.saml.v2.assertion.NameIDType

      if(expiredAssertion)
         throw new AssertionExpiredException();
     
      SubjectType subject = assertion.getSubject();
      JAXBElement<NameIDType> jnameID = (JAXBElement<NameIDType>) subject.getContent().get(0);
      NameIDType nameID = jnameID.getValue();
      String userName = nameID.getValue();
      List<String> roles = new ArrayList<String>();

      //Let us get the roles
      AttributeStatementType attributeStatement = (AttributeStatementType) assertion.getStatementOrAuthnStatementOrAuthzDecisionStatement().get(0);
      List<Object> attList = attributeStatement.getAttributeOrEncryptedAttribute();
View Full Code Here

Examples of org.jboss.identity.federation.saml.v2.assertion.NameIDType

      if(expiredAssertion)
         throw new AssertionExpiredException();
     
      SubjectType subject = assertion.getSubject();
      JAXBElement<NameIDType> jnameID = (JAXBElement<NameIDType>) subject.getContent().get(0);
      NameIDType nameID = jnameID.getValue();
      final String userName = nameID.getValue();
      List<String> roles = new ArrayList<String>();

      //Let us get the roles
      AttributeStatementType attributeStatement = (AttributeStatementType) assertion.getStatementOrAuthnStatementOrAuthzDecisionStatement().get(0);
      List<Object> attList = attributeStatement.getAttributeOrEncryptedAttribute();
View Full Code Here

Examples of org.jboss.identity.federation.saml.v2.assertion.NameIDType

            confirmationMethod, null);

      // create a subject using the caller principal.
      Principal principal = context.getCallerPrincipal();
      String subjectName = principal == null ? "ANONYMOUS" : principal.getName();
      NameIDType nameID = SAMLAssertionFactory.createNameID(null, "urn:jboss:identity-federation", subjectName);
      SubjectType subject = SAMLAssertionFactory.createSubject(nameID, subjectConfirmation);

      // TODO: add SAML statements that corresponds to the claims provided by the requester.

      // create the SAML assertion.
      NameIDType issuerID = SAMLAssertionFactory.createNameID(null, null, context.getTokenIssuer());
      AssertionType assertion = SAMLAssertionFactory.createAssertion(assertionID, issuerID, lifetime.getCreated(),
            conditions, subject, null);

      // convert the constructed assertion to element.
      Element assertionElement = null;
View Full Code Here

Examples of org.jboss.identity.federation.saml.v2.assertion.NameIDType

      authnRequest.setProtocolBinding(JBossSAMLConstants.HTTP_POST_BINDING.get());
      authnRequest.setDestination(destination);
      authnRequest.setIssueInstant(issueInstant);
     
      //Create an issuer
      NameIDType issuer = JBossSAMLBaseFactory.createNameID();
      issuer.setValue(issuerValue);
     
      authnRequest.setIssuer(issuer);
     
      return authnRequest;
     
View Full Code Here

Examples of org.jboss.identity.federation.saml.v2.assertion.NameIDType

    * @param issuerID
    * @return
    */
   public static NameIDType getIssuer(String issuerID)
   {
      NameIDType nid = assertionObjectFactory.createNameIDType();
      nid.setValue(issuerID);
      return nid;
   }
View Full Code Here

Examples of org.jboss.identity.federation.saml.v2.assertion.NameIDType

     
      //Create assertion -> subject
      SubjectType subjectType = JBossSAMLBaseFactory.createSubject();
     
      //subject -> nameid
      NameIDType nameIDType = JBossSAMLBaseFactory.createNameID();
      nameIDType.setFormat(idp.getNameIDFormat());
      nameIDType.setValue(idp.getNameIDFormatValue());
     
      JAXBElement<NameIDType> jaxbNameIDType = JBossSAMLBaseFactory.createNameID(nameIDType);
      subjectType.getContent().add(jaxbNameIDType);
     
      SubjectConfirmationType subjectConfirmation =
View Full Code Here

Examples of org.jboss.identity.federation.saml.v2.assertion.NameIDType

     
      //ID
      responseType.setID(ID);
     
      //Issuer
      NameIDType issuer = issuerInfo.getIssuer();
      responseType.setIssuer(issuer);
     
      //Status
      String statusCode = issuerInfo.getStatusCode();
      if(statusCode == null)
View Full Code Here

Examples of org.jboss.identity.federation.saml.v2.assertion.NameIDType

    * @param value a {@code String} representing the name value.
    * @return the constructed {@code NameIDType} instance.
    */
   public static NameIDType createNameID(String format, String qualifier, String value)
   {
      NameIDType nameID = new NameIDType();
      nameID.setFormat(format);
      nameID.setNameQualifier(qualifier);
      nameID.setValue(value);
      return nameID;
   }
View Full Code Here

Examples of org.jboss.identity.federation.saml.v2.assertion.NameIDType

             = new org.jboss.identity.federation.saml.v2.protocol.ObjectFactory();
      LogoutRequestType lrt = of.createLogoutRequestType();
      lrt.setIssueInstant(XMLTimeUtil.getIssueInstant());
     
      //Create an issuer
      NameIDType issuerNameID = JBossSAMLBaseFactory.createNameID();
      issuerNameID.setValue(issuer);
      lrt.setIssuer(issuerNameID);
     
      return lrt;
   }
View Full Code Here

Examples of org.jboss.identity.federation.saml.v2.assertion.NameIDType

        
         //Create Issue Instant
         queryType.setIssueInstant(XMLTimeUtil.getIssueInstant());
        
         //Create Issuer
         NameIDType nameIDType = SAMLAssertionFactory.getObjectFactory().createNameIDType();
         nameIDType.setValue(issuer);
         queryType.setIssuer(nameIDType);
        
         JAXBElement<?> jaxbQueryType = SOAPSAMLXACMLUtil.getJAXB(queryType);
        
         Envelope envelope = createEnvelope(jaxbQueryType);
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.