Search in sources :

Example 1 with AudienceRestrictionBuilder

use of org.opensaml.saml2.core.impl.AudienceRestrictionBuilder in project MaxKey by dromara.

the class ConditionsGenerator method builderAudienceRestriction.

public AudienceRestriction builderAudienceRestriction(String audienceUrl) {
    AudienceRestriction audienceRestriction = new AudienceRestrictionBuilder().buildObject();
    Audience audience = new AudienceBuilder().buildObject();
    audience.setAudienceURI(audienceUrl);
    audienceRestriction.getAudiences().add(audience);
    logger.debug("Audience URL " + audienceUrl);
    return audienceRestriction;
}
Also used : AudienceRestriction(org.opensaml.saml2.core.AudienceRestriction) AudienceRestrictionBuilder(org.opensaml.saml2.core.impl.AudienceRestrictionBuilder) Audience(org.opensaml.saml2.core.Audience) AudienceBuilder(org.opensaml.saml2.core.impl.AudienceBuilder)

Aggregations

Audience (org.opensaml.saml2.core.Audience)1 AudienceRestriction (org.opensaml.saml2.core.AudienceRestriction)1 AudienceBuilder (org.opensaml.saml2.core.impl.AudienceBuilder)1 AudienceRestrictionBuilder (org.opensaml.saml2.core.impl.AudienceRestrictionBuilder)1