Re: Is it possible to add a static prefix to the generated URL from CryptoMapper?
Hi Magnus, Sorry for replying so late, but I wanted to add a word of caution here. There is a problem with Form#dispatchEvent() when you change the number of URL segments. I cant remember the exact details, but it has something to do with the Url#resolveRelative() or the call to it making assumptions about the number of url segments. You can trigger the event by using a DropDownChoice with Javascript (not AJAX) on change events. Cheers, Jesse On 28/05/2013 17:12, Martin Grigorov wrote: Hi Magnus, At the moment this doesn't seem to be very easy because #encryptUrl() and #decryptUrl() methods are private.. If they were protected then it would be quite easy to extend the class and provide your own #mapHandler() / #mapRequest() methods which decide themselves what to encrypt/decrypt. Feel free to file a ticket for improvement for this. At the moment you can use your own root request mapper that wraps CryptoMapper and removes/prepends "user" segment in the beginning of the url for IPageClassRequestHandlers. On Tue, May 28, 2013 at 5:52 PM, Magnus K Karlsson < magnus.r.karls...@gmail.com> wrote: Hi! I'm successfully testing CryptoMapper in Apache Wicket 6 with unique URL for each Session. But I'm also depending on to be able to define security constaint in the web.xml. example-wicket /user/* These are the roles who have access. ROLE_USER ROLE_ADMIN So my question is it possible to prefix predefined classes with CryptoMapper? Example I used to mount pages with mountPage("/user/" + Foo.class.getSimpleName(), Foo.class); which resulted in URL: http://localhost:8080/example-wicket/user/Foo now I would like to decrypt Foo and it's possible page parameters, but not 'user', e.g. http://localhost:8080/example-wicket/user/o9SSJ_GJqmO_wPa3pBY9hhdoDOXrAjrVc8kgLXVijrc6zKG3_zokAWSik-hyrZBXM4h5Qc2JOn0WfAGPQo8eYA/o9Sc8/Jqme5/9SS98 -- Best Regards Magnus K Karlsson Mobile: +46 (0)70 218 00 84 Email: magnus.r.karls...@gmail.com Blog: magnus-k-karlsson.blogspot.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Is it possible to add a static prefix to the generated URL from CryptoMapper?
Hi Magnus, At the moment this doesn't seem to be very easy because #encryptUrl() and #decryptUrl() methods are private.. If they were protected then it would be quite easy to extend the class and provide your own #mapHandler() / #mapRequest() methods which decide themselves what to encrypt/decrypt. Feel free to file a ticket for improvement for this. At the moment you can use your own root request mapper that wraps CryptoMapper and removes/prepends "user" segment in the beginning of the url for IPageClassRequestHandlers. On Tue, May 28, 2013 at 5:52 PM, Magnus K Karlsson < magnus.r.karls...@gmail.com> wrote: > Hi! > > I'm successfully testing CryptoMapper in Apache Wicket 6 with unique URL > for each Session. But I'm also depending on to be able to define security > constaint in the web.xml. > > > > example-wicket > /user/* > > > > These are the roles who have access. > ROLE_USER > ROLE_ADMIN > > > > So my question is it possible to prefix predefined classes with > CryptoMapper? > > Example > > I used to mount pages with mountPage("/user/" + Foo.class.getSimpleName(), > Foo.class); > > which resulted in URL: http://localhost:8080/example-wicket/user/Foo > > now I would like to decrypt Foo and it's possible page parameters, but not > 'user', e.g. > > > http://localhost:8080/example-wicket/user/o9SSJ_GJqmO_wPa3pBY9hhdoDOXrAjrVc8kgLXVijrc6zKG3_zokAWSik-hyrZBXM4h5Qc2JOn0WfAGPQo8eYA/o9Sc8/Jqme5/9SS98 > > -- > Best Regards > Magnus K Karlsson > > Mobile: +46 (0)70 218 00 84 > Email: magnus.r.karls...@gmail.com > Blog: magnus-k-karlsson.blogspot.com >
Is it possible to add a static prefix to the generated URL from CryptoMapper?
Hi! I'm successfully testing CryptoMapper in Apache Wicket 6 with unique URL for each Session. But I'm also depending on to be able to define security constaint in the web.xml. example-wicket /user/* These are the roles who have access. ROLE_USER ROLE_ADMIN So my question is it possible to prefix predefined classes with CryptoMapper? Example I used to mount pages with mountPage("/user/" + Foo.class.getSimpleName(), Foo.class); which resulted in URL: http://localhost:8080/example-wicket/user/Foo now I would like to decrypt Foo and it's possible page parameters, but not 'user', e.g. http://localhost:8080/example-wicket/user/o9SSJ_GJqmO_wPa3pBY9hhdoDOXrAjrVc8kgLXVijrc6zKG3_zokAWSik-hyrZBXM4h5Qc2JOn0WfAGPQo8eYA/o9Sc8/Jqme5/9SS98 -- Best Regards Magnus K Karlsson Mobile: +46 (0)70 218 00 84 Email: magnus.r.karls...@gmail.com Blog: magnus-k-karlsson.blogspot.com