Examples of SubjectType


Examples of org.apache.syncope.common.types.SubjectType

            final Result condition,
            final Object before,
            final Object output,
            final Object... input) {

        SubjectType subjectType = null;
        AbstractSubject subject = null;

        if (before instanceof UserTO) {
            subjectType = SubjectType.USER;
            subject = userDAO.find(((UserTO) before).getId());
View Full Code Here

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

      //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>();

      //Let us get the roles
View Full Code Here

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

      //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();
      final String userName = nameID.getValue();
      List<String> roles = new ArrayList<String>();

      //Let us get the roles
View Full Code Here

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

      // 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

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

    * Create an empty subject
    * @return
    */
   public static SubjectType createSubject()
   {
      SubjectType subjectType = assertionObjectFactory.createSubjectType();
      return subjectType;
   }
View Full Code Here

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

      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

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

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

      // 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

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

      //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();
      final String userName = nameID.getValue();
      List<String> roles = new ArrayList<String>();

      //Let us get the roles
View Full Code Here

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

      // 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
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.