You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Rakesh A <ia...@rediffmail.com> on 2015/10/15 17:22:21 UTC
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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: CryptoMapper and mounted resource URLs
Posted by Martin Grigorov <mg...@apache.org>.
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 <ia...@rediffmail.com>
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-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
Re: CryptoMapper and mounted resource URLs
Posted by Rakesh A <ia...@rediffmail.com>.
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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: CryptoMapper and mounted resource URLs
Posted by Martin Grigorov <mg...@apache.org>.
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 <ia...@rediffmail.com>
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-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>