[java-identity-provider COMMIT] /trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/PopulateAuthenticat...
noreply at shibboleth.net
noreply at shibboleth.net
Fri May 29 16:08:25 EDT 2015
Author: scantor
Date: Fri May 29 16:08:24 2015
New Revision: 7537
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=7537&view=rev
Log:
Add warning when no authentication flows are configured.
Modified:
trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/PopulateAuthenticationContext.java
Modified: trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/PopulateAuthenticationContext.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/PopulateAuthenticationContext.java?rev=7537&r1=7536&r2=7537&view=diff
==============================================================================
--- trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/PopulateAuthenticationContext.java (original)
+++ trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/PopulateAuthenticationContext.java Fri May 29 16:08:24 2015
@@ -115,7 +115,8 @@
evalRegistry = Constraint.isNotNull(registry, "PrincipalEvalPredicateFactoryRegistry cannot be null");
}
-
+
+// Checkstyle: CyclomaticComplexity OFF
/** {@inheritDoc} */
@Override
protected void doExecute(@Nonnull final ProfileRequestContext profileRequestContext,
@@ -126,7 +127,12 @@
getLogPrefix());
authenticationContext.setPrincipalEvalPredicateFactoryRegistry(evalRegistry);
}
-
+
+ if (availableFlows.isEmpty()) {
+ log.warn("{} No authentication flows are available for this request", getLogPrefix());
+ return;
+ }
+
final Collection<String> activeFlows = activeFlowsLookupStrategy.apply(profileRequestContext);
if (activeFlows != null && !activeFlows.isEmpty()) {
@@ -155,8 +161,13 @@
}
}
- log.debug("{} Installed {} authentication flows into AuthenticationContext", getLogPrefix(),
- authenticationContext.getPotentialFlows().size());
+ if (authenticationContext.getPotentialFlows().isEmpty()) {
+ log.warn("{} No authentication flows are active for this request", getLogPrefix());
+ } else {
+ log.debug("{} Installed {} authentication flows into AuthenticationContext", getLogPrefix(),
+ authenticationContext.getPotentialFlows().size());
+ }
}
+// Checkstyle: CyclomaticComplexity ON
}
More information about the commits
mailing list