[java-identity-provider COMMIT] in /trunk: idp-authn-api/src/main/java/net/shibboleth/idp/authn/ExternalAuthenticatio...
noreply at shibboleth.net
noreply at shibboleth.net
Tue Sep 29 19:21:12 EDT 2015
Author: scantor
Date: Tue Sep 29 19:21:12 2015
New Revision: 7792
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=7792&view=rev
Log:
IDP-821 - Add indicator when external flows are invoked as a subflow
Modified:
trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/ExternalAuthentication.java
trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ExternalAuthenticationImpl.java
trunk/idp-conf/src/main/resources/system/flows/authn/authn-abstract-flow.xml
trunk/idp-conf/src/main/resources/system/flows/authn/external-authn-flow.xml
trunk/idp-conf/src/main/resources/system/flows/authn/remoteuser-authn-flow.xml
Modified: trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/ExternalAuthentication.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/ExternalAuthentication.java?rev=7792&r1=7791&r2=7792&view=diff
==============================================================================
--- trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/ExternalAuthentication.java (original)
+++ trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/ExternalAuthentication.java Tue Sep 29 19:21:12 2015
@@ -74,7 +74,14 @@
/** Request attribute that provides the entity ID of the relying party that is requesting authentication. */
@Nonnull @NotEmpty public static final String RELYING_PARTY_PARAM = "relyingParty";
-
+
+ /**
+ * Request attribute that indicates whether we're being called as an extension of another login flow.
+ *
+ * @since 3.2.0
+ */
+ @Nonnull @NotEmpty public static final String EXTENDED_FLOW_PARAM = "extended";
+
/**
* Computes the appropriate location to pass control to to invoke an external authentication mechanism.
*
Modified: trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ExternalAuthenticationImpl.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ExternalAuthenticationImpl.java?rev=7792&r1=7791&r2=7792&view=diff
==============================================================================
--- trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ExternalAuthenticationImpl.java (original)
+++ trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ExternalAuthenticationImpl.java Tue Sep 29 19:21:12 2015
@@ -56,6 +56,9 @@
/** State of request to pull from. */
@Nonnull private final ProfileRequestContext profileRequestContext;
+
+ /** Track whether we were invoked from within another login flow. */
+ private final boolean extendedFlow;
/**
* Constructor.
@@ -64,9 +67,22 @@
*/
public ExternalAuthenticationImpl(@Nonnull final ProfileRequestContext input) {
profileRequestContext = Constraint.isNotNull(input, "ProfileRequestContext cannot be null");
+ extendedFlow = false;
relyingPartyContextLookupStrategy = new ChildContextLookup<>(RelyingPartyContext.class);
}
-
+
+ /**
+ * Constructor.
+ *
+ * @param input profile request context to expose
+ * @param extended called as extended flow from another login flow
+ */
+ public ExternalAuthenticationImpl(@Nonnull final ProfileRequestContext input, final boolean extended) {
+ profileRequestContext = Constraint.isNotNull(input, "ProfileRequestContext cannot be null");
+ extendedFlow = extended;
+ relyingPartyContextLookupStrategy = new ChildContextLookup<>(RelyingPartyContext.class);
+ }
+
/**
* Set lookup strategy for relying party context.
*
@@ -90,10 +106,11 @@
}
request.setAttribute(ProfileRequestContext.BINDING_KEY, profileRequestContext);
+ request.setAttribute(EXTENDED_FLOW_PARAM, extendedFlow);
request.setAttribute(PASSIVE_AUTHN_PARAM, authnContext.isPassive());
request.setAttribute(FORCE_AUTHN_PARAM, authnContext.isForceAuthn());
-
+
final Collection<Principal> principals = authnContext.getAttemptedFlow().getSupportedPrincipals();
if (!principals.isEmpty()) {
request.setAttribute(AUTHN_METHOD_PARAM, principals.iterator().next().getName());
Modified: trunk/idp-conf/src/main/resources/system/flows/authn/authn-abstract-flow.xml
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-conf/src/main/resources/system/flows/authn/authn-abstract-flow.xml?rev=7792&r1=7791&r2=7792&view=diff
==============================================================================
--- trunk/idp-conf/src/main/resources/system/flows/authn/authn-abstract-flow.xml (original)
+++ trunk/idp-conf/src/main/resources/system/flows/authn/authn-abstract-flow.xml Tue Sep 29 19:21:12 2015
@@ -7,7 +7,7 @@
<input name="calledAsSubflow" type="boolean" required="true" />
<!-- Indicates another login flow has called one as a subflow. -->
[... 36 lines stripped ...]
More information about the commits
mailing list