[java-identity-provider COMMIT] in /trunk: idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ExternalAuthent...

noreply at shibboleth.net noreply at shibboleth.net
Tue May 27 11:56:16 EDT 2014


Author: scantor
Date: Tue May 27 11:56:15 2014
New Revision: 5968

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=5968&view=rev
Log:
External authn JSP converted to RemoteUser servlet living at V2 compatible location.

Added:
    trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/RemoteUserAuthServlet.java   (with props)
Modified:
    trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ExternalAuthenticationImpl.java
    trunk/idp-conf/src/main/resources/system/flows/authn/external-authn-flow.xml
    trunk/idp-war/src/main/webapp/WEB-INF/web.xml
    trunk/idp-war/src/main/webapp/resources/external-authn/

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=5968&r1=5967&r2=5968&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 May 27 11:56:15 2014
@@ -29,6 +29,8 @@
 import org.joda.time.DateTime;
 import org.opensaml.messaging.context.navigate.ChildContextLookup;
 import org.opensaml.profile.context.ProfileRequestContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.google.common.base.Function;
 
@@ -44,6 +46,9 @@
  */
 public class ExternalAuthenticationImpl extends ExternalAuthentication {
 
+    /** Class logger. */
+    @Nonnull private final Logger log = LoggerFactory.getLogger(ExternalAuthenticationImpl.class);
+    
     /** Lookup function for relying party context. */
     @Nonnull private Function<ProfileRequestContext,RelyingPartyContext> relyingPartyContextLookupStrategy;
     
@@ -149,11 +154,6 @@
             extContext.setAuthnInstant((DateTime) attr);
         }
         
-        attr = request.getAttribute(AUTHENTICATION_METHOD_KEY);
-        if (attr != null && attr instanceof String) {
-            extContext.setAuthnMethod((String) attr);
-        }
-        
         attr = request.getAttribute(AUTHENTICATION_ERROR_KEY);
         if (attr != null && attr instanceof String) {
             extContext.setAuthnError((String) attr);

Modified: trunk/idp-conf/src/main/resources/system/flows/authn/external-authn-flow.xml
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-conf/src/main/resources/system/flows/authn/external-authn-flow.xml?rev=5968&r1=5967&r2=5968&view=diff
==============================================================================
--- trunk/idp-conf/src/main/resources/system/flows/authn/external-authn-flow.xml (original)
+++ trunk/idp-conf/src/main/resources/system/flows/authn/external-authn-flow.xml Tue May 27 11:56:15 2014
@@ -5,7 +5,7 @@
 
     <!-- This is a login flow for external authentication handled outside the webflow engine. -->
     
-    <view-state id="ExternalTransfer" view="externalRedirect:contextRelative:resources/external-authn/container.jsp?conversation=#{flowExecutionContext.getKey().toString()}">
+    <view-state id="ExternalTransfer" view="externalRedirect:contextRelative:Authn/RemoteUser?conversation=#{flowExecutionContext.getKey().toString()}">
         <on-render>
             <evaluate expression="opensamlProfileRequestContext.getSubcontext(T(net.shibboleth.idp.authn.context.AuthenticationContext)).getSubcontext(T(net.shibboleth.idp.authn.context.ExternalAuthenticationContext), true).setFlowExecutionUrl(flowExecutionUrl + '&amp;_eventId_proceed=1')" />
             <evaluate expression="externalContext.getNativeRequest().getSession().setAttribute('conversation' + flowExecutionContext.getKey().toString(), new net.shibboleth.idp.authn.impl.ExternalAuthenticationImpl(opensamlProfileRequestContext))" />

Modified: trunk/idp-war/src/main/webapp/WEB-INF/web.xml
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-war/src/main/webapp/WEB-INF/web.xml?rev=5968&r1=5967&r2=5968&view=diff
==============================================================================
--- trunk/idp-war/src/main/webapp/WEB-INF/web.xml (original)
+++ trunk/idp-war/src/main/webapp/WEB-INF/web.xml Tue May 27 11:56:15 2014
@@ -79,6 +79,17 @@
         <url-pattern>/</url-pattern>
     </servlet-mapping>
 
+    <!-- Servlet protected by container used for RemoteUser authentication -->
+    <servlet>
+        <servlet-name>RemoteUserAuthHandler</servlet-name>
+        <servlet-class>net.shibboleth.idp.authn.impl.RemoteUserAuthServlet</servlet-class>
+        <load-on-startup>2</load-on-startup>
+    </servlet>
+    <servlet-mapping>
+        <servlet-name>RemoteUserAuthHandler</servlet-name>
+        <url-pattern>/Authn/RemoteUser</url-pattern>
+    </servlet-mapping>
+
     <!-- Send request to the EntityID to the SAML metadata handler. -->
     <!-- 
     <servlet>



More information about the commits mailing list