<div dir="ltr">Hi<div><br></div><div style>I am trying to create a custom login handler however I am running into some unexpected issues.</div><div style><br></div><div style>For starters I pretty much copied the example found here</div>
<div style><br></div><div style><a href="https://wiki.shibboleth.net/confluence/display/SHIB2/IdPDevExtLoginHandler">https://wiki.shibboleth.net/confluence/display/SHIB2/IdPDevExtLoginHandler</a><br></div><div style><br></div>
<div style>However it seems this example does not work out of the box. The first issue was I kept getting</div><div style><br></div><div style>&quot;Configuration problem: Id is required for element &#39;LoginHandler&#39; when used as a top-level tag&quot;</div>
<div style><br></div><div style>As it turned out one needed to override the shouldGenerateId method in the BeanDefinitionParser class to always return true (Which I find very strange as the source code for AbstractSimpleBeanDefinitionParser seems to already have the class returning true by default sao I shouldn&#39;t have to override it).</div>
<div style><br></div><div style>Now the next issue I keep getting is the following error message:</div><div style><br></div><div style><br></div><div style>ERROR [edu.internet2.middleware.shibboleth.common.config.BaseService:188] - Configuration was not loaded for shibboleth.HandlerManager service, error creating components.  The root cause of this error was: org.springframework.beans.NotWritablePropertyException: Invalid property &#39;type&#39; of bean class [com.custom.shibboleth.CustomHandlerFactoryBean]: Bean property &#39;type&#39; is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?&quot;<br>
</div><div style><br></div><div style><br></div><div style>I don&#39;t understand why does it want a &#39;type&#39; setter, I don&#39;t even have such an attribute/variable anywhere in my code and certainly not in the class it claims to need it (CustomHandlerFactoryBean).</div>
<div style><br></div><div style>My loginHandler is defined on handler.xml as follows:</div><div style><br></div>&lt;ph:ProfileHandlerGroup xmlns:ph=&quot;urn:mace:shibboleth:2.0:idp:profile-handler&quot; xmlns:cus=&quot;urn:mace:custom:shibboleth:custommod:authn&quot; xmlns:xsi=&quot;<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>&quot; <br>
                        xsi:schemaLocation=&quot;urn:mace:shibboleth:2.0:idp:profile-handler classpath:/schema/shibboleth-2.0-idp-profile-handler.xsd<br>urn:mace:custom:shibboleth:custommod:authn classpath:/schema/customplugin.xsd&quot;&gt;<br>
.<br>.<br>.<br>.<br>.<br>&lt;ph:LoginHandler xsi:type=&quot;cus:CustomHandler&quot;&gt;<br>        &lt;ph:AuthenticationMethod&gt;urn:oasis:names:tc:SAML:2.0:ac:classes:unspecified&lt;/ph:AuthenticationMethod&gt;<br>    &lt;/ph:LoginHandler&gt;<div>
<br><div style><br></div><div style>It seems the examples on the wiki are neither complete nor functional. I&#39;d be glad to edit and fix them once I get it working but so far I have had no luck.</div><div style><br></div>
<div style>Any help is appreciated!</div></div></div>