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);
}
Aggregations