Issues creating custom login handler

Byte Flinger byteflinger at gmail.com
Tue Jul 9 09:08:46 EDT 2013


Hi

I am trying to create a custom login handler however I am running into some
unexpected issues.

For starters I pretty much copied the example found here

https://wiki.shibboleth.net/confluence/display/SHIB2/IdPDevExtLoginHandler

However it seems this example does not work out of the box. The first issue
was I kept getting

"Configuration problem: Id is required for element 'LoginHandler' when used
as a top-level tag"

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).

Now the next issue I keep getting is the following error message:


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?"


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).

My loginHandler is defined on handler.xml as follows:

<ph:ProfileHandlerGroup
xmlns:ph="urn:mace:shibboleth:2.0:idp:profile-handler"
xmlns:cus="urn:mace:custom:shibboleth:custommod:authn" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="urn:mace:shibboleth:2.0:idp:profile-handler
classpath:/schema/shibboleth-2.0-idp-profile-handler.xsd
urn:mace:custom:shibboleth:custommod:authn
classpath:/schema/customplugin.xsd">
.
.
.
.
.
<ph:LoginHandler xsi:type="cus:CustomHandler">

<ph:AuthenticationMethod>urn:oasis:names:tc:SAML:2.0:ac:classes:unspecified</ph:AuthenticationMethod>
    </ph:LoginHandler>


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.

Any help is appreciated!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://shibboleth.net/pipermail/users/attachments/20130709/86ced344/attachment.html 


More information about the users mailing list