<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>"Configuration problem: Id is required for element 'LoginHandler' when used as a top-level tag"</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'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 'type' of bean class [com.custom.shibboleth.CustomHandlerFactoryBean]: Bean property 'type' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?"<br>
</div><div style><br></div><div style><br></div><div style>I don't understand why does it want a 'type' setter, I don'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><ph:ProfileHandlerGroup xmlns:ph="urn:mace:shibboleth:2.0:idp:profile-handler" xmlns:cus="urn:mace:custom:shibboleth:custommod:authn" xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>" <br>
xsi:schemaLocation="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"><br>
.<br>.<br>.<br>.<br>.<br><ph:LoginHandler xsi:type="cus:CustomHandler"><br> <ph:AuthenticationMethod>urn:oasis:names:tc:SAML:2.0:ac:classes:unspecified</ph:AuthenticationMethod><br> </ph:LoginHandler><div>
<br><div style><br></div><div style>It seems the examples on the wiki are neither complete nor functional. I'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>