Re: [OpenMap Users] http-auth in OpenMap

From: Don Dietrick <dfdietrick_at_gmail.com>
Date: Tue, 15 Mar 2011 12:45:04 -0400

Hi Ketil,

This isn't supported right now within OpenMap, but the modifications
don't seem to be that hard to implement. I found some useful info
here:

http-auth, how it works -
http://en.wikipedia.org/wiki/Basic_access_authentication, I think the
basic example of the interaction was key here.

Looking at OpenMap, the WMSPluIin extends from WebImagePlugIn, and
WebImagePlugIngetRectangle() needs up be updated to use a URI object
to create the URL. The URI needs to be constructed in a format
described here: http://en.wikipedia.org/wiki/URI_scheme , where the
user:password portion in the example would need to be replaced by the
authentication info the server wants, encoded base 64. WebImagePlugIn
should also be modified to test for 401 responses (per the first
Wikipedia link) and query the user for login/password to use here.

To encode the user/password, I'd use this package:
http://iharder.sourceforge.net/current/java/base64/

Hope this helps,

Don

On Fri, Mar 11, 2011 at 5:24 PM, <Ketil.Lund_at_ffi.no> wrote:
> Hi,
>
>
> I would like to use OpenMap for fetching (and displaying) layers from a
> password-protected WMS server.
>
> The server uses standard http-auth for authentication.
>
>
>
> Is this possible, and if so, how to do it?
>
>
>
> Thanks,
>
> Ketil
>
>
>
>
>

--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Tue Mar 15 2011 - 12:50:26 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:10 EDT