Authen-Simple-WebForm
view release on metacpan or search on metacpan
lib/Authen/Simple/WebForm.pm view on Meta::CPAN
How the initial url will be sent to the server, either via HTTP GET request, or HTTP POST.
Defaults to "POST".
=item username_prefix
Username prefix string.
With this, you can automatically prefix your the submitted username with
some string. This can can be useful if loging into a windows domain, for
example. In that case, you would set it to something like "MyDomain\".
Off be default.
=item username_field
Form field name for the username.
Defaults to "username".
=item password_field
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
( run in 2.359 seconds using v1.01-cache-2.11-cpan-788537b7465 )