From: Nicolas R. <nic...@gm...> - 2013-05-06 10:16:37
|
getAuthenticationHandler is here for compatibility purposes only in esigate 4.0, and will be removed in the future. Defining an authentication handler adds the handler to the extension list. Since you are adding directly your authentication handler to the extension list (this is the right way to do it with esigate 4.0) , getAuthenticationHandler is not updated. However, you should see your extension being registered in logs. (add some logging in the init part just to be sure). Be careful, extension configuration *redefines* the extension list. There are some default extensions which will be removed with your configuration. See default value in documentation. Nicolas Le 6 mai 2013 à 12:08, Francois-Xavier Bonnet <fra...@ce...> a écrit : > Since EsiGate 4.0 AuthenticationHandler interface has been removed, so I guess you are using an older version. > > If you were using 4.0 version, you could see class GenericAuthentificationHandler and your configuration would be correct. > > With a 3.x version the configuration would have looked like: > author.authenticationHandler=fr.esigate.authentication.CustomUserAuthenticationHandler > > I suggest that you migrate to the latest version (4.0). With the new extension mechanism, you will be able to do a lot more things (not only authentication) that what you could do in previous versions. > > 2013/5/6 <nic...@ne...> > Hello, > > Just to summarize : > create a customAuthenticationHandler which implements AuthenticationHandler (GenericAuthenticationHandler does'nt exist anymore) > add some code in the preRequest(HttpClientRequest request, ResourceContext requestContext) method > add the extension in the driver.properties file : extensions=fr.esigate.authentication.CustomUserAuthenticationHandler > Is there any other actions ? > When i test this one in my ctrlcmd : > Driver driver = DriverFactory.getInstance("author"); > System.out.println(driverConfiguration.getAuthenticationHandler()); // --> net.webassembletool.authentication.RemoteUserAuthenticationHandler > My extension 'fr.esigate.authentication.CustomUserAuthenticationHandler' does not seem to be considered > Here is my driver.properties configuration file : > author.remoteUrlBase=http://localhost:8080/MagnoliaAuthor/ > author.uriEncoding=UTF-8 > author.timeout=5000 > author.useCache=false > author.extensions=fr.esigate.authentication.CustomUserAuthenticationHandler > > Thanks > Nicolas TOQUET > > > Le 06/05/2013 09:39, Francois-Xavier Bonnet a écrit : >> Ok, so you have to write an extension: the extension should detect when you are redirected to the login page, then post the login form and once authenticated send again the original request. >> Maybe we could think of a generic extension for form-based authentication but currently it does not exist. >> >> If you need an example on how to do this, you can have a look at the implementation for CAS SSO: >> http://www.esigate.org/esigate-cas/xref/org/esigate/cas/CasAuthenticationHandler.html >> >> If you decided to write something reusable on other projects, remember that contributions to the project are always welcome. >> >> >> 2013/5/6 <nic...@ne...> >> Hello, >> >> It is a form based authentication. The webapp we have to query is Magnolia. There is a public and an author instance. On the Author instance we have to enter credentials when we call a page. >> >> Thanks >> Nicolas TOQUET >> >> >> Le 05/05/2013 22:25, Francois-Xavier Bonnet a écrit : >>> Hi, >>> >>> Is it basic authentication or form-based authentication ? >>> Which version of EsiGate are you using ? >>> Le 5 mai 2013 18:50, "Nicolas TOQUET" <nic...@ne...> a écrit : >>> Hello >>> >>> we try to get the response from a page in an author instance protected >>> by login/password. >>> how can we pass the credential (driver.properties ?) >>> There is no proxy. >>> >>> Thanks >>> Nicolas >>> >>> ------------------------------------------------------------------------------ >>> Get 100% visibility into Java/.NET code with AppDynamics Lite >>> It's a free troubleshooting tool designed for production >>> Get down to code-level detail for bottlenecks, with <2% overhead. >>> Download for free and get started troubleshooting in minutes. >>> http://p.sf.net/sfu/appdyn_d2d_ap2 >>> _______________________________________________ >>> Webassembletool-users mailing list >>> Web...@li... >>> https://lists.sourceforge.net/lists/listinfo/webassembletool-users >> >> > > > ------------------------------------------------------------------------------ > Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET > Get 100% visibility into your production application - at no cost. > Code-level diagnostics for performance bottlenecks with <2% overhead > Download for free and get started troubleshooting in minutes. > http://p.sf.net/sfu/appdyn_d2d_ap1_______________________________________________ > Webassembletool-users mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webassembletool-users |