Package org.opensaml.saml1.binding.artifact

Examples of org.opensaml.saml1.binding.artifact.SAML1ArtifactType0002Builder


   */
  public void populateAttributeTable(Map<String,String> attributeTable) {
    Iterator<AttributeStatement> statements = assertion.getAttributeStatements().iterator();

    while (statements.hasNext()) {
      AttributeStatement statement = statements.next();
      Iterator<Attribute> attrs = statement.getAttributes().iterator();

      while (attrs.hasNext()) {
        Attribute attr = (Attribute) attrs.next();
        String name = attr.getAttributeNamespace() + "/" + attr.getAttributeName();

View Full Code Here


            }
        } else if (saml1 != null) {
            Subject samlSubject = null;
            for (Statement stmt : saml1.getStatements()) {
                if (stmt instanceof AttributeStatement) {
                    AttributeStatement attrStmt = (AttributeStatement) stmt;
                    samlSubject = attrStmt.getSubject();
                } else if (stmt instanceof AuthenticationStatement) {
                    AuthenticationStatement authStmt = (AuthenticationStatement) stmt;
                    samlSubject = authStmt.getSubject();
                } else {
                    AuthorizationDecisionStatement authzStmt =
View Full Code Here

        List<AttributeStatement> attributeStatements = new ArrayList<AttributeStatement>();

        if (attributeData != null && attributeData.size() > 0) {
            for (AttributeStatementBean statementBean : attributeData) {
                // Create the attribute statementBean and set the subject
                AttributeStatement attributeStatement = attributeStatementV1Builder.buildObject();
                Subject attributeSubject =
                    SAML1ComponentBuilder.createSaml1v1Subject(statementBean.getSubject());
                attributeStatement.setSubject(attributeSubject);
                // Add the individual attributes
                for (AttributeBean values : statementBean.getSamlAttributes()) {
                    List<Object> attributeValues = values.getAttributeValues();
                   
                    Attribute samlAttribute =
                        createSamlv1Attribute(
                            values.getSimpleName(),
                            values.getQualifiedName(),
                            attributeValues
                        );
                    attributeStatement.getAttributes().add(samlAttribute);
                }
                // Add the completed attribute statementBean to the collection
                attributeStatements.add(attributeStatement);
            }
        }
View Full Code Here

        List<AttributeStatement> attributeStatements = new ArrayList<AttributeStatement>();

        if (attributeData != null && attributeData.size() > 0) {
            for (AttributeStatementBean statementBean : attributeData) {
                // Create the attribute statementBean and set the subject
                AttributeStatement attributeStatement = attributeStatementV1Builder.buildObject();
                Subject attributeSubject =
                    SAML1ComponentBuilder.createSaml1v1Subject(statementBean.getSubject());
                attributeStatement.setSubject(attributeSubject);
                // Add the individual attributes
                for (AttributeBean values : statementBean.getSamlAttributes()) {
                    List<?> attributeValues = values.getAttributeValues();
                    if (attributeValues == null || attributeValues.isEmpty()) {
                        attributeValues = values.getCustomAttributeValues();
                    }
                   
                    Attribute samlAttribute =
                        createSamlv1Attribute(
                            values.getSimpleName(),
                            values.getQualifiedName(),
                            attributeValues
                        );
                    attributeStatement.getAttributes().add(samlAttribute);
                }
                // Add the completed attribute statementBean to the collection
                attributeStatements.add(attributeStatement);
            }
        }
View Full Code Here

      
        AudienceRestrictionCondition audienceRestriction =
            audienceRestrictionV1Builder.buildObject();
       
        for (String audienceURI : audienceRestrictionBean.getAudienceURIs()) {
            Audience audience = audienceV1Builder.buildObject();
            audience.setUri(audienceURI);
            audienceRestriction.getAudiences().add(audience);
        }
        return audienceRestriction;
    }
View Full Code Here

        String host = "http://" + config.getFirstProperty("HostName");
        assertion.setIssuer(host);
        assertion.setIssueInstant(new DateTime());

        if (appilesTo != null) {
            Audience audience = (Audience) buildXMLObject(Audience.DEFAULT_ELEMENT_NAME);
            audience.setUri(appilesTo);
            AudienceRestrictionCondition audienceRestrictions = (AudienceRestrictionCondition) buildXMLObject(AudienceRestrictionCondition.DEFAULT_ELEMENT_NAME);
            audienceRestrictions.getAudiences().add(audience);

            conditions.getAudienceRestrictionConditions().add(audienceRestrictions);
        }
View Full Code Here

                builderFactory.getBuilder(Audience.DEFAULT_ELEMENT_NAME);
        }
      
        AudienceRestrictionCondition audienceRestriction =
            audienceRestrictionV1Builder.buildObject();
        Audience audience = audienceV1Builder.buildObject();
        audience.setUri(audienceURI);
        audienceRestriction.getAudiences().add(audience);
        return audienceRestriction;
    }
View Full Code Here

                builderFactory.getBuilder(Audience.DEFAULT_ELEMENT_NAME);
        }
      
        AudienceRestrictionCondition audienceRestriction =
            audienceRestrictionV1Builder.buildObject();
        Audience audience = audienceV1Builder.buildObject();
        audience.setUri(audienceURI);
        audienceRestriction.getAudiences().add(audience);
        return audienceRestriction;
    }
View Full Code Here

            }
            conditions.setNotOnOrAfter(newNotBefore.plusMinutes(tokenPeriodMinutes));
        }
       
        if (conditionsBean.getAudienceURI() != null) {
            AudienceRestrictionCondition audienceRestriction =
                createSamlv1AudienceRestriction(conditionsBean.getAudienceURI());
            conditions.getAudienceRestrictionConditions().add(audienceRestriction);
        }
       
        if (conditionsBean.getAudienceRestrictions() != null
            && !conditionsBean.getAudienceRestrictions().isEmpty()) {
            for (AudienceRestrictionBean audienceRestrictionBean
                : conditionsBean.getAudienceRestrictions()) {
                AudienceRestrictionCondition audienceRestriction =
                        createSamlv1AudienceRestriction(audienceRestrictionBean);
                conditions.getAudienceRestrictionConditions().add(audienceRestriction);
            }
        }
View Full Code Here

        if (audienceV1Builder == null) {
            audienceV1Builder = (SAMLObjectBuilder<Audience>)
                builderFactory.getBuilder(Audience.DEFAULT_ELEMENT_NAME);
        }
      
        AudienceRestrictionCondition audienceRestriction =
            audienceRestrictionV1Builder.buildObject();
       
        for (String audienceURI : audienceRestrictionBean.getAudienceURIs()) {
            Audience audience = audienceV1Builder.buildObject();
            audience.setUri(audienceURI);
            audienceRestriction.getAudiences().add(audience);
        }
        return audienceRestriction;
    }
View Full Code Here

TOP

Related Classes of org.opensaml.saml1.binding.artifact.SAML1ArtifactType0002Builder

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.