public class NameIDFormatFilter extends AbstractInitializableComponent implements MetadataFilter
NameIDFormat content to entities in order to drive software
behavior based on them.
The entities to annotate are identified with a Predicate, and multiple formats can be
associated with each.| Modifier and Type | Field and Description |
|---|---|
private com.google.common.collect.Multimap<com.google.common.base.Predicate<EntityDescriptor>,String> |
applyMap
Rules for adding formats.
|
private SAMLObjectBuilder<NameIDFormat> |
formatBuilder
Builder for
NameIDFormat. |
private org.slf4j.Logger |
log
Class logger.
|
private boolean |
removeExistingFormats
Whether to strip any existing Formats when adding new ones.
|
| Constructor and Description |
|---|
NameIDFormatFilter()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
org.opensaml.core.xml.XMLObject |
filter(org.opensaml.core.xml.XMLObject metadata) |
protected void |
filterEntitiesDescriptor(EntitiesDescriptor descriptor)
Filters entities descriptor.
|
protected void |
filterEntityDescriptor(EntityDescriptor descriptor)
Filters entity descriptor.
|
protected void |
filterRoleDescriptor(RoleDescriptor role,
Collection<String> formats)
Filters role descriptor.
|
void |
setRemoveExistingFormats(boolean flag)
Set whether the filter should remove any existing formats from an entity to which it adds
new ones.
|
void |
setRules(Map<com.google.common.base.Predicate<EntityDescriptor>,Collection<String>> rules)
Set the mappings from
Predicate to format collection to apply. |
destroy, doDestroy, doInitialize, initialize, isDestroyed, isInitialized@Nonnull private final org.slf4j.Logger log
private boolean removeExistingFormats
@Nonnull @NonnullElements private com.google.common.collect.Multimap<com.google.common.base.Predicate<EntityDescriptor>,String> applyMap
@Nonnull private final SAMLObjectBuilder<NameIDFormat> formatBuilder
NameIDFormat.public void setRemoveExistingFormats(boolean flag)
Defaults to false (for compatibility).
flag - flag to setpublic void setRules(@Nonnull @NonnullElements Map<com.google.common.base.Predicate<EntityDescriptor>,Collection<String>> rules)
Predicate to format collection to apply.rules - rules to apply@Nullable public org.opensaml.core.xml.XMLObject filter(@Nullable org.opensaml.core.xml.XMLObject metadata) throws FilterException
filter in interface MetadataFilterFilterExceptionprotected void filterEntityDescriptor(@Nonnull EntityDescriptor descriptor)
descriptor - entity descriptor to filterprotected void filterRoleDescriptor(@Nonnull RoleDescriptor role, @Nonnull @NonnullElements Collection<String> formats)
role - role to modifyformats - formats to attachprotected void filterEntitiesDescriptor(@Nonnull EntitiesDescriptor descriptor)
descriptor - entities descriptor to filterCopyright © 1999–2019 Shibboleth Consortium. All rights reserved.