3 Replies Latest reply on Jan 15, 2014 8:55 AM by Eric Wittmann

    How do I use a custom LoginService for my WAR in Fuse 6.1?

    Eric Wittmann Apprentice

      I'm currently using the latest download of Fuse 6.1 Alpha and I'm trying to use a custom LoginService for my web app (I need a login service that supports both BASIC authentication and SAML Bearer Token authentication).  I have a very simple test web application here:

       

        https://github.com/EricWittmann/fuse-test-apps/tree/master/fta-custom-login-service-war

       

      This web application includes a custom login service here:

       

        https://github.com/EricWittmann/fuse-test-apps/blob/master/fta-custom-login-service-war/src/main/java/org/overlord/fta/login/MyLoginService.java

       

      And it attempts to configure it in Jetty via the jetty-web.xml file included in the WEB-INF:

       

        https://github.com/EricWittmann/fuse-test-apps/blob/master/fta-custom-login-service-war/src/main/webapp/WEB-INF/jetty-web.xml

       

      Unfortunately this gives me a ClassNotFoundError:

       

        java.lang.ClassNotFoundException: org.overlord.fta.login.MyLoginService not found by io.hawt.hawtio-karaf-terminal [239]

       

      If I then try to use the standard hash login service instead, I get this:

       

        java.lang.NoSuchMethodException: org.eclipse.jetty.security.ConstraintSecurityHandler.setLoginService(org.eclipse.jetty.security.HashLoginService)

       

      Help me Obi-Wan!