Hey Alexandre.
If you log into Geoserver with the same credentials in a separate browser
tab (but same window)... Then go back to your map... Does it still not work?

On Wed, Nov 24, 2010 at 5:28 AM, Alexandre Busquets <[email protected]>wrote:

> Hi
> Someone can help me please?
> I have to do a cookie based getMap request to a secured layer. I do
> not want to use the Auth Base method.
> When I use the following code I can log in to the geoserver admin area
> as 'prova' user but when I try to get a map request I to the secured
> layer I don't get anything.
> With the code at bootom if I acces to admin area (/geoserver/web/) I'm
> loggued but I can't see the wms calls
>
> <?php
> error_reporting(63);
>
> function current_millis() {
>    list($usec, $sec) = explode(" ", microtime());
>    return round(((float)$usec + (float)$sec) * 1000);
> }
>
>
> $url="/geoserver/wms?WIDTH=512&SRS=EPSG%3A26713&LAYERS=sf%3Aroads&HEIGHT=358&STYLES=&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&BBOX=579388.6795955,4906985.9174548,619573.3870882,4935083.818397";
>
> $username = "prova";
> $password = "prova";
> $key  = "geoserver";
>
> $tokenValiditySeconds = 1209600; // 14 days
> $expiryTime = current_millis() + ($tokenValiditySeconds * 1000);
>
> $signatureValue = md5($username . ":". $expiryTime . ":" . $password .
> ":" . $key);
> $tokenValue = $username . ":" . $expiryTime . ":" . $signatureValue;
> $tokenValueBase64 = base64_encode($tokenValue);
>
> $cookieEexpiryTime = time() + ( 60 * 60 * 24 * 5 );
> setrawcookie("ACEGI_SECURITY_HASHED_REMEMBER_ME_COOKIE",
> '"'.$tokenValueBase64.'"', $cookieEexpiryTime, "/geoserver",
> "php.xxx.net");
>
>
> ?>
> <hr />
> <img src="<?php echo $url?>" />
>
>
> ------------------------------------------------------------------------------
> Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
> Tap into the largest installed PC base & get more eyes on your game by
> optimizing for Intel(R) Graphics Technology. Get started today with the
> Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
> http://p.sf.net/sfu/intelisp-dev2dev
> _______________________________________________
> Geoserver-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>



-- 
Jamie Popkin
Little Earth
250 390 6816
http://littleearth.ca
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to