On Friday, February 19, 2016 at 7:38:34 AM UTC-8, Anthony wrote:
>
> Are you using SessionVariable to store and re-send the session cookie? 
> web2py uses a session cookie to link the client with a session on the 
> server, and the login status is stored in the session.
>

Yes, when I ask for app/default/user/login?_next ...  I use the 
-SessionVariable dsvr (similar to the example page), being careful to use 
one dash and no dollarsign.

Then for the various URLs I try when submitting the form, I use -WebSession 
$dsvr.

When I ask PowerShell what the value of $dsvr is, I get

PS C:\Users\develop2> $dsvr

Headers               : {}
Cookies               : System.Net.CookieContainer
UseDefaultCredentials : False
Credentials           :
Certificates          :
UserAgent             : Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) 
WindowsPowerShell/5.0.10586.0
Proxy                 :
MaximumRedirection    : -1


PS C:\Users\develop2>


I must be missing something something in the cookie, because it doesn't 
change when I submit the form.  (I've answered part of my original question 
by using a browser to log in, and looking at httpserver.log for the URL in 
that POST submit.  It goes back to app/user/login, but httpserver.log 
doesn't show whether there were any tails to the URL ('#' or '?arg....').


> Anthony
>
>
Thanks for helping.

/dps
 

> On Thursday, February 18, 2016 at 11:04:04 PM UTC-5, Dave S wrote:
>>
>> I'm trying to futz around a user's problem on a Windows client, so I'm 
>> learning about Invoke-WebRequest in PowerShell.
>> <URL:https://technet.microsoft.com/en-us/library/hh849901.aspx>
>>
>> I'm following the Facebook login example on that page, but trying to log 
>> into my app.  I can get the login form correctly (it appears), and I can 
>> update the form fields in a way that seems to be acceptable (on both ends), 
>> but the action is just '#', and I post to //host/app/default/user/login or 
>> //host/app/default/user/login# I get a 200 response and a fresh copy of the 
>> login form, rather than continuing to the _next page set in the form 
>> (app/default/index).  If I try posting the form to app/default/index, I get 
>> a 303 and back to the login form.
>>
>> Can someone who has a clue hit me with it?
>>
>> /dps
>>
>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to