<div dir="ltr">So I&#39;ve started trying to implement external authentication for the IdP.<div><br></div><div>So far I&#39;ve:</div><div><ul><li>Created a class that implements LoginHandler</li><li>Ensured my class sets the PRINCIPAL_NAME_KEY &amp; AUTHENTICATION_METHOD_KEY attributes on the request</li>

<li>Ensure I call AuthenticationEngine.returnToAuthenticationEngine as the last thing in processing</li><li>Added my handler to handler.xml</li><li>Packaged my Impl in a jar and added to the idp.war</li><li>Update the web.xml in idp.war to register my servlet and bind to a URL and updated idp.war</li>

</ul><div><br></div></div><div>After doing all that, I of course got a Tomcat error stating my class couldn&#39;t be cast as a Servlet (my bad - the docs say Filter, Servlet or JSP page).</div><div><br></div><div>Looking at Remote User as my baseline, I now see:</div>

<div><ul><li>RemoteUserAuthServlet</li><li>RemoteUserLoginHandler</li><li>RemoteUserLoginHandlerBeanDefinitionParser</li><li>RemoteUserLoginHandlerFactoryBean</li></ul><div>I&#39;m just wondering if every Login Handler impl needs all of these as a hazard of using Spring, or if I&#39;m over complicating things.  </div>

</div><div><br></div><div>If the answer is yes, what else do I need that I&#39;m missing?  Spring XML config file?</div><div><br></div><div>If it matters....</div><div><br></div><div>HANDLER.XML</div><div><div>    &lt;ph:LoginHandler xsi:type=&quot;ph:ExternalAuthn&quot; </div>

<div>                     externalAuthnPath=&quot;/authn/external/SHSession&quot;</div><div>                     supportsForcedAuthentication=&quot;false&quot;</div><div>                     supportsPassiveAuthentication=&quot;false&quot; </div>

<div>                     authenticationDuration=&quot;30&quot;&gt;</div><div>                         &lt;ph:AuthenticationMethod&gt;urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport&lt;/ph:AuthenticationMethod&gt;</div>

<div>        &lt;!-- &lt;ph:QueryParam name=&quot;foo&quot; value=&quot;bar&quot; /&gt; --&gt;</div><div>    &lt;/ph:LoginHandler&gt;</div></div><div><br></div><div><br></div><div>WEB.XML</div><div><div>    &lt;servlet&gt;</div>

<div>        &lt;servlet-name&gt;SHSessionKeyLoginHandler&lt;/servlet-name&gt;</div><div>        &lt;servlet-class&gt;</div><div>            com.example.sso.saml.shibboleth.idp.authn.provider.SHSessionKeyLoginHandler</div>

<div>         &lt;/servlet-class&gt;</div><div>        &lt;load-on-startup&gt;4&lt;/load-on-startup&gt;</div><div>    &lt;/servlet&gt;</div><div><br></div><div>    &lt;servlet-mapping&gt;</div><div>        &lt;servlet-name&gt;SHSessionKeyLoginHandler&lt;/servlet-name&gt;</div>

<div>        &lt;url-pattern&gt;/authn/external/SHSession&lt;/url-pattern&gt;</div><div>    &lt;/servlet-mapping&gt;</div></div><div><br></div></div>