Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Perl Mechanize and Single Sign On

by Gangabass (Vicar)
on Dec 09, 2014 at 13:06 UTC ( #1109718=note: print w/replies, xml ) Need Help??


in reply to Perl Mechanize and Single Sign On

I'm sure you need to use `$mech->submit_form()` with `button` param.
$mech->submit_form( with_fields => { login_field => "somelogin", password_field => "somepassword", }, button => "your_submit_button_name", );
But may be some JavaScript magic is used by this webpage so you need to check headers submitted from your web browser (I use Firefox's HTTPFox add-on for this). Also there is no need to
$mech->cookie_jar(HTTP::Cookies->new());
because Mechanize will work with cookies by default...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1109718]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2018-07-19 08:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (404 votes). Check out past polls.

    Notices?