[java-identity-provider] branch master updated: Convert subject lookups to rely on protected method.

Scott Cantor cantor.2 at osu.edu
Mon Aug 13 20:38:47 EDT 2018


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=b6c6bef5f9d533dc7c4e75d2552254e340e5251a

The following commit(s) were added to refs/heads/master by this push:
       new  b6c6bef   Convert subject lookups to rely on protected method.
b6c6bef is described below

commit b6c6bef5f9d533dc7c4e75d2552254e340e5251a
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon Aug 13 20:37:59 2018 -0400

    Convert subject lookups to rely on protected method.
---
 .../net/shibboleth/idp/authn/AbstractValidationAction.java   | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractValidationAction.java b/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractValidationAction.java
index b9af6aa..f2943c0 100644
--- a/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractValidationAction.java
+++ b/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractValidationAction.java
@@ -240,7 +240,7 @@ public abstract class AbstractValidationAction<InboundMessageType, OutboundMessa
     @Override
     @Nonnull @NonnullElements @Unmodifiable @NotLive public <T extends Principal> Set<T> getSupportedPrincipals(
             @Nonnull final Class<T> c) {
-        return authenticatedSubject.getPrincipals(c);
+        return getSubject().getPrincipals(c);
     }
     
     /**
@@ -256,10 +256,10 @@ public abstract class AbstractValidationAction<InboundMessageType, OutboundMessa
             @Nullable @NonnullElements final Collection<T> principals) {
         ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
         
-        authenticatedSubject.getPrincipals().clear();
+        getSubject().getPrincipals().clear();
         
         if (principals != null && !principals.isEmpty()) {
-            authenticatedSubject.getPrincipals().addAll(Collections2.filter(principals, Predicates.notNull()));
+            getSubject().getPrincipals().addAll(Collections2.filter(principals, Predicates.notNull()));
         }
     }
  
@@ -295,7 +295,7 @@ public abstract class AbstractValidationAction<InboundMessageType, OutboundMessa
         // able to satisfy the request. This step only applies if the validator has been injected with
         // specific principals, otherwise the flow's capabilities have already been examined.
         final RequestedPrincipalContext rpCtx = authenticationContext.getSubcontext(RequestedPrincipalContext.class);
-        if (rpCtx != null && rpCtx.getOperator() != null && !authenticatedSubject.getPrincipals().isEmpty()) {
+        if (rpCtx != null && rpCtx.getOperator() != null && !getSubject().getPrincipals().isEmpty()) {
             log.debug("{} Request contains principal requirements, evaluating for compatibility", getLogPrefix());
             for (final Principal p : rpCtx.getRequestedPrincipals()) {
                 final PrincipalEvalPredicateFactory factory =
@@ -339,12 +339,12 @@ public abstract class AbstractValidationAction<InboundMessageType, OutboundMessa
         
         if (addDefaultPrincipals && authenticationContext.getAttemptedFlow() != null) {
             log.debug("{} Adding custom Principal(s) defined on underlying flow descriptor", getLogPrefix());
-            authenticatedSubject.getPrincipals().addAll(
+            getSubject().getPrincipals().addAll(
                     authenticationContext.getAttemptedFlow().getSupportedPrincipals());
         }
         
         final AuthenticationResult result = new AuthenticationResult(authenticationContext.getAttemptedFlow().getId(),
-                populateSubject(authenticatedSubject));
+                populateSubject(getSubject()));
         authenticationContext.setAuthenticationResult(result);
         
         // Override cacheability if a predicate is installed.

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list