[java-identity-provider COMMIT] /trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/audit/impl/Attribute...
noreply at shibboleth.net
noreply at shibboleth.net
Mon Sep 21 16:11:17 EDT 2015
Author: scantor
Date: Mon Sep 21 16:11:16 2015
New Revision: 7764
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=7764&view=rev
Log:
Add option to audit on unfiltered attributes.
Modified:
trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/audit/impl/AttributesAuditExtractor.java
Modified: trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/audit/impl/AttributesAuditExtractor.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/audit/impl/AttributesAuditExtractor.java?rev=7764&r1=7763&r2=7764&view=diff
==============================================================================
--- trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/audit/impl/AttributesAuditExtractor.java (original)
+++ trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/audit/impl/AttributesAuditExtractor.java Mon Sep 21 16:11:16 2015
@@ -36,6 +36,9 @@
/** {@link Function} that returns the attribute IDs from an {@link AttributeContext}. */
public class AttributesAuditExtractor implements Function<ProfileRequestContext,Collection<String>> {
+ /** Extract the unfiltered attribute list instead of the filtered list. */
+ private boolean useUnfiltered;
+
/** Lookup strategy for AttributeContext to read from. */
@Nonnull private final Function<ProfileRequestContext,AttributeContext> attributeContextLookupStrategy;
@@ -55,13 +58,23 @@
attributeContextLookupStrategy = Constraint.isNotNull(strategy,
"AttributeContext lookup strategy cannot be null");
}
+
+ /**
+ * Set whether to extract the list of unfiltered attributes instead of the filtered attributes.
+ *
+ * @param flag flag to set
+ */
+ public void setUseUnfiltered(final boolean flag) {
+ useUnfiltered = flag;
+ }
/** {@inheritDoc} */
@Override
@Nullable public Collection<String> apply(@Nullable final ProfileRequestContext input) {
final AttributeContext attributeCtx = attributeContextLookupStrategy.apply(input);
if (attributeCtx != null) {
- return attributeCtx.getIdPAttributes().keySet();
+ return (useUnfiltered ? attributeCtx.getUnfilteredIdPAttributes()
+ : attributeCtx.getIdPAttributes()).keySet();
} else {
return Collections.emptyList();
}
More information about the commits
mailing list