Search in sources :

Example 1 with EncryptionOptionalCriterion

use of org.opensaml.xmlsec.criterion.EncryptionOptionalCriterion in project cas by apereo.

the class SamlIdPObjectEncrypter method resolveEncryptionParameters.

/**
 * Resolve encryption parameters.
 *
 * @param service                 the service
 * @param encryptionConfiguration the encryption configuration
 * @return the encryption parameters
 * @throws ResolverException the exception
 */
protected EncryptionParameters resolveEncryptionParameters(final SamlRegisteredService service, final BasicEncryptionConfiguration encryptionConfiguration) throws ResolverException {
    val criteria = new CriteriaSet();
    criteria.add(new EncryptionConfigurationCriterion(encryptionConfiguration));
    criteria.add(new EncryptionOptionalCriterion(service.isEncryptionOptional()));
    return new BasicEncryptionParametersResolver().resolveSingle(criteria);
}
Also used : lombok.val(lombok.val) EncryptionOptionalCriterion(org.opensaml.xmlsec.criterion.EncryptionOptionalCriterion) EncryptionConfigurationCriterion(org.opensaml.xmlsec.criterion.EncryptionConfigurationCriterion) CriteriaSet(net.shibboleth.utilities.java.support.resolver.CriteriaSet) BasicEncryptionParametersResolver(org.opensaml.xmlsec.impl.BasicEncryptionParametersResolver)

Aggregations

lombok.val (lombok.val)1 CriteriaSet (net.shibboleth.utilities.java.support.resolver.CriteriaSet)1 EncryptionConfigurationCriterion (org.opensaml.xmlsec.criterion.EncryptionConfigurationCriterion)1 EncryptionOptionalCriterion (org.opensaml.xmlsec.criterion.EncryptionOptionalCriterion)1 BasicEncryptionParametersResolver (org.opensaml.xmlsec.impl.BasicEncryptionParametersResolver)1