[java-identity-provider] branch master updated: Remove unused authentication context lookup.
Scott Cantor
cantor.2 at osu.edu
Tue May 28 17:36:38 EDT 2019
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch master
in repository java-identity-provider.
View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=1fa73f85959b6f2fb0400007853e7246f60126d8
The following commit(s) were added to refs/heads/master by this push:
new 1fa73f8 Remove unused authentication context lookup.
1fa73f8 is described below
commit 1fa73f85959b6f2fb0400007853e7246f60126d8
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue May 28 17:36:34 2019 -0400
Remove unused authentication context lookup.
---
.../idp/profile/impl/FilterAttributes.java | 31 ----------------------
.../idp/profile/impl/ResolveAttributes.java | 25 -----------------
2 files changed, 56 deletions(-)
diff --git a/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/FilterAttributes.java b/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/FilterAttributes.java
index b974a81..ad9b1a0 100644
--- a/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/FilterAttributes.java
+++ b/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/FilterAttributes.java
@@ -38,7 +38,6 @@ import net.shibboleth.idp.attribute.context.AttributeContext;
import net.shibboleth.idp.attribute.filter.AttributeFilter;
import net.shibboleth.idp.attribute.filter.AttributeFilterException;
import net.shibboleth.idp.attribute.filter.context.AttributeFilterContext;
-import net.shibboleth.idp.authn.context.AuthenticationContext;
import net.shibboleth.idp.authn.context.SubjectContext;
import net.shibboleth.idp.authn.context.navigate.SubjectContextPrincipalLookupFunction;
import net.shibboleth.idp.profile.AbstractProfileAction;
@@ -87,11 +86,6 @@ public class FilterAttributes extends AbstractProfileAction {
@Nonnull private Function<ProfileRequestContext,String> principalNameLookupStrategy;
/**
- * Strategy used to locate the {@link AuthenticationContext} associated with a given {@link ProfileRequestContext}.
- */
- @Nonnull private Function<ProfileRequestContext,AuthenticationContext> authnContextLookupStrategy;
-
- /**
* Strategy used to locate the {@link SAMLMetadataContext} associated with a given {@link ProfileRequestContext}.
*/
@Nonnull private Function<ProfileRequestContext,SAMLMetadataContext> metadataContextLookupStrategy;
@@ -116,9 +110,6 @@ public class FilterAttributes extends AbstractProfileAction {
/** Whether to treat resolver errors as equivalent to resolving no attributes. */
private boolean maskFailures;
- /** AuthenticationContext to work from (if any). */
- @Nullable private AuthenticationContext authenticationContext;
-
/** AttributeContext to filter. */
@Nullable private AttributeContext attributeContext;
@@ -140,8 +131,6 @@ public class FilterAttributes extends AbstractProfileAction {
new SubjectContextPrincipalLookupFunction().compose(
new ChildContextLookup<>(SubjectContext.class));
- authnContextLookupStrategy = new ChildContextLookup<>(AuthenticationContext.class);
-
// Default: inbound msg context -> SAMLPeerEntityContext -> SAMLMetadataContext
metadataContextLookupStrategy =
new ChildContextLookup<>(SAMLMetadataContext.class).compose(
@@ -238,21 +227,6 @@ public class FilterAttributes extends AbstractProfileAction {
principalNameLookupStrategy = Constraint.isNotNull(strategy, "Principal name lookup strategy cannot be null");
}
-
- /**
- * Set the strategy used to locate the {@link AuthenticationContext} associated with a given
- * {@link ProfileRequestContext}.
- *
- * @param strategy strategy used to locate the {@link AuthenticationContext} associated with a given
- * {@link ProfileRequestContext}
- */
- public void setAuthenticationContextLookupStrategy(
- @Nonnull final Function<ProfileRequestContext,AuthenticationContext> strategy) {
- ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
-
- authnContextLookupStrategy =
- Constraint.isNotNull(strategy, "AuthenticationContext lookup strategy cannot be null");
- }
/**
* Set the strategy used to locate the {@link SAMLMetadataContext} associated with a given
@@ -319,11 +293,6 @@ public class FilterAttributes extends AbstractProfileAction {
log.debug("{} No attributes to filter", getLogPrefix());
return false;
}
-
- authenticationContext = authnContextLookupStrategy.apply(profileRequestContext);
- if (authenticationContext == null) {
- log.debug("{} No authentication context available.", getLogPrefix());
- }
return true;
}
diff --git a/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/ResolveAttributes.java b/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/ResolveAttributes.java
index f51e28a..8bb3d9b 100644
--- a/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/ResolveAttributes.java
+++ b/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/ResolveAttributes.java
@@ -75,11 +75,6 @@ public final class ResolveAttributes extends AbstractProfileAction {
/** Strategy used to locate the principal name associated with the attribute resolution. */
@Nullable private Function<ProfileRequestContext,String> principalNameLookupStrategy;
- /**
- * Strategy used to locate an {@link AuthenticationContext} associated with a given {@link ProfileRequestContext}.
- */
- @Nullable private Function<ProfileRequestContext,AuthenticationContext> authnContextLookupStrategy;
-
/** Strategy used to locate or create the {@link AttributeContext} to populate. */
@Nonnull private Function<ProfileRequestContext,AttributeContext> attributeContextCreationStrategy;
@@ -113,8 +108,6 @@ public final class ResolveAttributes extends AbstractProfileAction {
new SubjectContextPrincipalLookupFunction().compose(
new ChildContextLookup<>(SubjectContext.class));
- authnContextLookupStrategy = new ChildContextLookup<>(AuthenticationContext.class);
-
// Defaults to ProfileRequestContext -> RelyingPartyContext -> AttributeContext.
attributeContextCreationStrategy = new ChildContextLookup<>(AttributeContext.class, true).compose(
new ChildContextLookup<>(RelyingPartyContext.class));
@@ -158,20 +151,6 @@ public final class ResolveAttributes extends AbstractProfileAction {
principalNameLookupStrategy = strategy;
}
-
- /**
- * Set the strategy used to locate the {@link AuthenticationContext} associated with a given
- * {@link ProfileRequestContext}.
- *
- * @param strategy strategy used to locate the {@link AuthenticationContext} associated with a given
- * {@link ProfileRequestContext}
- */
- public void setAuthenticationContextLookupStrategy(
- @Nullable final Function<ProfileRequestContext,AuthenticationContext> strategy) {
- ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
-
- authnContextLookupStrategy = strategy;
- }
/**
* Set the strategy used to locate or create the {@link AttributeContext} to populate.
@@ -257,10 +236,6 @@ public final class ResolveAttributes extends AbstractProfileAction {
return false;
}
- if (authnContextLookupStrategy != null) {
- authenticationContext = authnContextLookupStrategy.apply(profileRequestContext);
- }
-
if (authenticationContext == null) {
log.debug("{} No authentication context available.", getLogPrefix());
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list