Re: CryptoMapper and mounted resource URLs
Hi, Yes. I think it is. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Fri, Oct 16, 2015 at 6:12 AM, Rakesh A wrote: > Hi, > > I did try overriding the #mapHandler() method and have a condition to check > for a specific type of 'IRequestHandler', and call "#encryptEntireUrl()" > method, this does work. > > @Override > public Url mapHandler(final IRequestHandler requestHandler) > { > Url myUrl = super.mapHandler(aRequestHandler); > if (requestHandler instanceof MyResourceRequestHandler) > { > return encryptEntireUrl(myUrl); > } > return myUrl; > } > > Is it the suggested way ? > > Regards, > Rakesh.A > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/CryptoMapper-and-mounted-resource-URLs-tp4672249p4672256.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: CryptoMapper and mounted resource URLs
Hi, I did try overriding the #mapHandler() method and have a condition to check for a specific type of 'IRequestHandler', and call "#encryptEntireUrl()" method, this does work. @Override public Url mapHandler(final IRequestHandler requestHandler) { Url myUrl = super.mapHandler(aRequestHandler); if (requestHandler instanceof MyResourceRequestHandler) { return encryptEntireUrl(myUrl); } return myUrl; } Is it the suggested way ? Regards, Rakesh.A -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/CryptoMapper-and-mounted-resource-URLs-tp4672249p4672256.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: CryptoMapper and mounted resource URLs
Hi, By default CryptoMapper encrypts the urls for not mounted pages and resources, i.e. ones which urls do not start with /wicket/bookmarkable/ or /wicket/resource/. The assumption is that you the page is mounted then the developer would like to use its friendly url. The methods are protected so you could override the default behavior. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Thu, Oct 15, 2015 at 5:22 PM, Rakesh A wrote: > Hi, > > I am trying to generate URLs for mounted resources, and use them later > (from > JavaScript). I expected using 'RequestCycle#urlFor()' with CryptoMapper > enabled will result encrypted urls. But I see I am wrong, and > implementation > in "CryptoMapper#encryptUrl(Url)" (gets into else block and calls > encryptRequestListenerParameter()) results plain text urls. > > Is there any way, to get/generate encrypted URLs for mounted > resources/pages. > > Attached quickstart to show the behavior. > > example1.zip > <http://apache-wicket.1842946.n4.nabble.com/file/n4672249/example1.zip> > > Regards, > Rakesh.A > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/CryptoMapper-and-mounted-resource-URLs-tp4672249.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
CryptoMapper and mounted resource URLs
Hi, I am trying to generate URLs for mounted resources, and use them later (from JavaScript). I expected using 'RequestCycle#urlFor()' with CryptoMapper enabled will result encrypted urls. But I see I am wrong, and implementation in "CryptoMapper#encryptUrl(Url)" (gets into else block and calls encryptRequestListenerParameter()) results plain text urls. Is there any way, to get/generate encrypted URLs for mounted resources/pages. Attached quickstart to show the behavior. example1.zip <http://apache-wicket.1842946.n4.nabble.com/file/n4672249/example1.zip> Regards, Rakesh.A -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/CryptoMapper-and-mounted-resource-URLs-tp4672249.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org