use of org.opensaml.saml.criterion.EntityRoleCriterion in project cas by apereo.
the class SamlRegisteredServiceCacheKeyTests method verifyCacheKeyDynamicMetadata.
@Test
public void verifyCacheKeyDynamicMetadata() {
val criteriaSet = new CriteriaSet();
val entityIdCriterion = new EntityIdCriterion("https://carmenwiki.osu.edu/shibboleth");
criteriaSet.add(entityIdCriterion);
criteriaSet.add(new EntityRoleCriterion(SPSSODescriptor.DEFAULT_ELEMENT_NAME));
val service = new SamlRegisteredService();
service.setName("Example");
service.setId(1000);
service.setServiceId(".+");
service.setMetadataLocation("https://mdq.something.net/entities/{0}");
val result1 = new SamlRegisteredServiceCacheKey(service, criteriaSet);
assertNotNull(result1.getId());
assertNotNull(result1.toString());
assertEquals(entityIdCriterion.getEntityId(), result1.getCacheKey());
val result2 = new SamlRegisteredServiceCacheKey(service, criteriaSet);
assertEquals(result1, result2);
}
use of org.opensaml.saml.criterion.EntityRoleCriterion in project cas by apereo.
the class SamlRegisteredServiceDefaultCachingMetadataResolverTests method getCriteriaFor.
private static CriteriaSet getCriteriaFor(final String entityId) {
val criteriaSet1 = new CriteriaSet();
criteriaSet1.add(new EntityIdCriterion(entityId));
criteriaSet1.add(new EntityRoleCriterion(SPSSODescriptor.DEFAULT_ELEMENT_NAME));
return criteriaSet1;
}
Aggregations