Package org.jboss.identity.federation.saml.v2.assertion

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


    *            subject and claims of SAML statements.
    * @return the constructed {@code SubjectType} instance.
    */
   public static SubjectType createSubject(NameIDType nameID, SubjectConfirmationType confirmation)
   {
      SubjectType subject = new SubjectType();
      ObjectFactory factory = getObjectFactory();
      if (nameID != null)
         subject.getContent().add(factory.createNameID(nameID));
      if (confirmation != null)
         subject.getContent().add(factory.createSubjectConfirmation(confirmation));
      return subject;
   }
View Full Code Here


      return assertionObjectFactory.createNameID(nameIDType);
   }
  
   public static SubjectType createSubject()
   {
      SubjectType subjectType = assertionObjectFactory.createSubjectType();
      return subjectType;
   }
View Full Code Here

      assertionType.setIssueInstant(issueInstant);
     
      assertionType.setIssuer(issuerInfo.getIssuer());
     
      //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 =
            JBossSAMLBaseFactory.createSubjectConfirmation(idp.getSubjectConfirmationMethod());
      SubjectConfirmationDataType subjectConfirmationData =
           JBossSAMLBaseFactory.createSubjectConfirmationData(sp.getRequestID(),
                 responseDestinationURI, issueInstant);
      subjectConfirmation.setSubjectConfirmationData(subjectConfirmationData);
     
      JAXBElement<SubjectConfirmationType> jaxbSubjectConfirmationType =
         JBossSAMLBaseFactory.createSubjectConfirmation(subjectConfirmation);
     
      subjectType.getContent().add(jaxbSubjectConfirmationType);
     
      assertionType.setSubject(subjectType);
     
      ResponseType responseType = createResponseType(ID, issuerInfo, assertionType);
      //InResponseTo ID
View Full Code Here

      //Check for validity of assertion
      boolean expiredAssertion = AssertionUtil.hasExpired(assertion);
      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>();

      //Set it on a thread local for JBID integrators
View Full Code Here

    *            subject and claims of SAML statements.
    * @return the constructed {@code SubjectType} instance.
    */
   public static SubjectType createSubject(NameIDType nameID, SubjectConfirmationType confirmation)
   {
      SubjectType subject = new SubjectType();
      ObjectFactory factory = getObjectFactory();
      if (nameID != null)
         subject.getContent().add(factory.createNameID(nameID));
      if (confirmation != null)
         subject.getContent().add(factory.createSubjectConfirmation(confirmation));
      return subject;
   }
View Full Code Here

    * @see IMetadataProvider#getMetaData()
    */
   @SuppressWarnings("unchecked")
   public EntityDescriptorType getMetaData()
   {
      EntityDescriptorType edt = null;
     
      if(this.metadataFileStream == null)
         throw new RuntimeException("Metadata file is not injected");
     
      try
View Full Code Here

   {
      String spName = request.getParameter("spname");
      String idpName = request.getParameter("idpname");
      String metadataURL = request.getParameter("metadataURL");
     
      EntityDescriptorType edt = getMetaData(metadataURL);
     
      configProvider.persist(edt, idpName);
     
      HttpSession httpSession = request.getSession();
      httpSession.setAttribute("idp", edt);
View Full Code Here

   {
      String idpName = request.getParameter("idpname");
      String spName = request.getParameter("spname");
      String metadataURL = request.getParameter("metadataURL");

      EntityDescriptorType edt = getMetaData(metadataURL);
      configProvider.persist(edt, spName);
     
      HttpSession httpSession = request.getSession();
      httpSession.setAttribute("sp", edt);
     
View Full Code Here

      Unmarshaller un = MetaDataBuilder.getUnmarshaller();
      JAXBElement<?> j = (JAXBElement<?>) un.unmarshal(is);
      Object obj = j.getValue();
      if(obj instanceof EntityDescriptorType == false)
         throw new RuntimeException("Unsupported type:"+ obj.getClass());
      EntityDescriptorType edt = (EntityDescriptorType) obj;
      return edt;
   }
View Full Code Here

          
           Certificate cert = keyManager.getCertificate(signingAlias);
           KeyInfoType keyInfo = KeyUtil.getKeyInfo(cert);
          
           //TODO: Assume just signing key for now
           KeyDescriptorType keyDescriptor = KeyDescriptorMetaDataBuilder.createKeyDescriptor(keyInfo,
                 null, 0, true, false);
          
           updateKeyDescriptor(metadata, keyDescriptor);
          
           //encryption
View Full Code Here

TOP

Related Classes of org.jboss.identity.federation.saml.v2.assertion.SubjectType

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.