Hello
I am trying to create a custom login handler for the IDP. I have followed the Custom Extension Guide at https://spaces.internet2.edu/display/SHIB2/IdPDevCustomExtension
I have a jar file with the following structure in my WEB-INF/lib directory of the idp webapp
0 10-02-09 11:34 META-INF/
106 10-02-09 11:34 META-INF/MANIFEST.MF
0 10-02-09 11:34 com/
0 10-02-09 11:34 com/nme/
0 10-02-09 11:34 com/nme/ext/
0 10-02-09 11:34 com/nme/ext/authn/
0 10-02-09 11:34 com/nme/ext/authn/config/
2680 10-02-09 11:34 com/nme/ext/authn/CustomLoginHandler.class
1160 10-02-09 11:34 com/nme/ext/authn/config/AuthnNamespaceHandler.class
2218 10-02-09 11:34 com/nme/ext/authn/config/CustomLoginHandlerBeanDefinitionParser.class
0 10-01-09 13:06 schema/
79 10-01-09 12:50 META-INF/spring.handlers
49 10-01-09 15:44 META-INF/spring.schemas
668 10-02-09 10:12 schema/authn.xsd
Here is my handler definition
<ProfileHandlerGroup xmlns="urn:mace:shibboleth:2.0:idp:profile-handler"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:nme="urn:mace:nme.com:ext:authn"
xsi:schemaLocation="urn:mace:shibboleth:2.0:idp:profile-handler classpath:/schema/shibboleth-2.0-idp-profile-handler.xsd urn:mace:nme.com:ext:authn classpath:/schema/authn.xsd">
<LoginHandler xsi:type="nme:WebAppRedirect" redirectUrl="/idplogin/login.nme" >
<AuthenticationMethod> urn:oasis:names:tc:SAML:2.0:ac:classes:unspecified </AuthenticationMethod>
</LoginHandler>
The problem is its complaining about AuthenmticationMethods in the error below when starting the IdP. Does any one have any ideas?
11:16:45.975 - ERROR - Configuration was not loaded for shibboleth.HandlerManager service, error creating components. The root cause of this error was: org.springframework.beans.Inva lidPropertyException: Invalid property 'authenticationMethods' of bean class [com.nme.ext.authn.CustomLoginHandler]: No property 'authenticationMethods' found
11:16:45.985 - ERROR - Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shibboleth.HandlerManager': Invocation of init method failed; nested exception is edu.internet2 .middleware.shibboleth.common.service.ServiceException: Configuration was not loaded for shibboleth.HandlerManager service, error creating components.
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1337) [spring-beans-2.5.5.jar:2.5.5]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473) [spring-beans-2.5.5.jar:2.5.5]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) [spring-beans-2.5.5.jar:2.5.5]
at java.security.AccessController.doPrivileged(Native Method) [na:1.5.0_14]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) [spring-beans-2.5.5.jar:2.5.5]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) [spring-beans-2.5.5.jar:2.5.5]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221) [spring-beans-2.5.5.jar:2.5.5]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) [spring-beans-2.5.5.jar:2.5.5]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) [spring-beans-2.5.5.jar:2.5.5]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) [spring-beans-2.5.5.jar:2.5.5]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429) [spring-beans-2.5.5.jar:2.5.5]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729) [spring-context-2.5.5.jar:2.5.5]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381) [spring-context-2.5.5.jar:2.5.5]
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) [spring-web-2.5.5.jar:2.5.5]
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) [spring-web-2.5.5.jar:2.5.5]
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) [spring-web-2.5.5.jar:2.5.5]
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764) [catalina-5.5.23.jar:na]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216) [catalina-5.5.23.jar:na]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760) [catalina-5.5.23.jar:na]
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740) [catalina-5.5.23.jar:na]
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544) [catalina-5.5.23.jar:na]
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920) [catalina-5.5.23.jar:na]
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883) [catalina-5.5.23.jar:na]
Your bean definition parser has a property 'beanClass', e.g.,
protected Class getBeanClass(Element element) {
return CustomLoginHandlerFactoryBean.class;
}
That class has to have the 'authenticationMethods' property.
It is supplied by shib's AbstractLoginHandlerFactoryBean, which
your CustomLoginHandlerFactoryBean should extend.
Jim