Authen-Simple-WebForm

 view release on metacpan or  search on metacpan

lib/Authen/Simple/WebForm.pm  view on Meta::CPAN

Form field name for the password.

Defaults to "password".


=item extra_fields

Array reference of key => value pairs, representing additional form fields to submit.

Often when submitting to a login form, other form fields are expected by the
login script. You may specify any number of them, and their repsective values,
using this option.

Example:

    extra_fields => [
        'language' => 'en_US',
        'trusted'  => 1
        ],

None submitted by default.


=item extra_headers

Array reference of key => value pairs, representing additional HTTP headers.

You can use this if you need to further mask your client to appear as 
a popular web browser. Some misbehaved servers may reject your script
if these are not set.

Example: (pose as netscape)

    extra_headers => [
       'User-Agent' => 'Mozilla/4.76 [en] (Win98; U)',
       'Accept' => 'image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*',
       'Accept-Charset' => 'iso-8859-1,*,utf-8',
       'Accept-Language' => 'en-US'
        ],

None submitted by default.


=item lwp_user_agent

The HTTP User Agent string to submit to the server in the HTTP headers.

Some servers may restrict access to certain user agents (ie. limit only
to MS Internet Explorer and Mozilla clients). You can forge a user agent
string with this.

Example:

    lwp_user_agent => 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.14) Gecko/2009090216 Ubuntu/9.04 (jaunty) Firefox/3.0.14',

Defaults to "Authen::Simple::WebForm/$VERSION".


=item lwp_timeout

Timeout in seconds. Set to zero to disable.

This is how long the script will wait for a response for each page fetch.

Defaults to "15" seconds.


=item lwp_protocols_allowed

Array reference of protocols to allow.

This will limit what protocols will be fetched. You're already setting the
URLS that will be loaded, but if you allow redirects (via lwp_requests_redirectable)
then those may go to a different protocol. For example, you may submit to an
SSL protected site (https) but be redirected to an unprotected page (http).

Defaults to ["http", "https"]


=item lwp_use_conn_cache

Boolean, set to 0 to disable.

Whether to use connection caching. See L<LWP::ConnCache> for details, as well as the "conn_cache" option to L<LWP>.

Defaults to enabled (1).


=item lwp_requests_redirectable

Array reference of request names for which we will automatically redirect.

See L<LWP> option requests_redirectable for details. This affects the responses
we get from the server. For example, if you are posting form data
(login_request_method == POST), and the successful login page returns a redirect
to some other page, "POST" would be needed here. We allow GET and POST by
default, so you only need to set this is if do not want this behavior.

Defaults to ["GET", "POST"]


=item trace

Boolean, set to 1 to enable.

If set to true, the data we recieve will be dumped out to STDERR.
This can be useful while you're trying to determine what fields need
passed, and what might be going wrong. When running your test scripts,
assuming your are starting from a test script, simply dump STDERR
to a file:

    perl test.pl 2>somefile.txt

Defaults to disabled (0).


=back


=head2 log

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.016 second using v1.00-cache-2.02-grep-82fe00e-cpan-2c419f77a38b )