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

Examples of org.jboss.identity.federation.saml.v2.metadata.ObjectFactory


      // 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());
View Full Code Here


    * Create an empty subject
    * @return
    */
   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

    * @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

    */
   public void persist(EntityDescriptorType entity, String id) throws IOException
   {
      File persistedFile = validateIdAndReturnMDFile(id);
     
      ObjectFactory of = new ObjectFactory();
     
      JAXBElement<?> jentity = of.createEntityDescriptor(entity);
     
      Marshaller m;
      try
      {
         m = JAXBUtil.getMarshaller(pkgName);
View Full Code Here

        
         ResponseType responseType = new ResponseType();
         ResultType resultType = responseContext.getResult();
         responseType.getResult().add(resultType);

         XACMLAuthzDecisionStatementType xacmlStatement = SOAPSAMLXACMLUtil.createXACMLAuthzDecisionStatementType();
         xacmlStatement.setRequest(requestType);
         xacmlStatement.setResponse(responseType);
        
         //Place the xacml statement in an assertion
         //Then the assertion goes inside a SAML Response
        
         String ID = IDGenerator.create("ID_");
View Full Code Here

TOP

Related Classes of org.jboss.identity.federation.saml.v2.metadata.ObjectFactory

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.