Authen-Simple-WebForm
view release on metacpan or search on metacpan
initial_expect
String or a compiled regex (eg. "qr/please\s+login/i").
If you want to make sure the page you got is the login form, you can
set a string here to check for. The page content will be tested
against this, and authentication will fail (with a logged error) if
this doesn't match.
With this, you can make sure the server isn't returning a sorry
server page, or similar.
Off by default.
initial_expect_cookie
String or a compiled regex (eg. "qr/please\s+login/i").
Similar to initial_expect, but checks the cookies returned by the
page.
NOTE: this matches the cookie key, and the value must simple have
some length.
Off by default.
check_initial_status_code
Boolean, set to 0 to disable.
Set to undef to skip checking the response status code from the
initial page. Otherwise, it must match HTTP::Status->is_success.
Defaults to enabled (1).
initial_request_method
This can be either "GET" or "POST".
How the initial url will be sent to the server, either via HTTP GET
request, or HTTP POST.
Defaults to "GET".
login_url
REQUIRED
The URL to which the login credentials will be submitted.
For example: https://host.company.com/login.pl
login_expect
String or a compiled regex (eg. "qr/login\s+successful/i").
Set to a unique string to expect in the resulting page when the
login was successful.
Be default, this is not turned on. If you do not set this, then as
long as the server returns a successful status code (see
HTTP::Status::is_success), then the user will be authenticated. Most
form based login systems return a successful status code even when
the login fails, so you'll probably want to set this.
A notable exception is the use of something like Apache::AuthCookie,
which will return a 403 Forbidden error code when authentication
fails.
Off by default.
login_expect_cookie
String or a compiled regex (eg. "qr/please\s+login/i").
Similar to login_expect, but checks the cookies returned by the
page. If you are also using "initial_url", please be aware that an
cookies set by that page will also test true here (ie. this checks
our cookie jar, not the content of the page). The cookie jar is
reset on every authentication request, so you don't have to worry
about stale cookies from previous authentication attempts.
NOTE: this matches the cookie key, and the value must simple have
some length.
Off by default.
check_login_status_code
Boolean, set to 0 to disable.
Set to undef to skip checking the response status code from the
login page. Otherwise, it must match HTTP::Status->is_success.
Defaults to enabled (1).
login_request_method
This can be either "GET" or "POST".
How the initial url will be sent to the server, either via HTTP GET
request, or HTTP POST.
Defaults to "POST".
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.
username_field
Form field name for the username.
Defaults to "username".
password_field
Form field name for the password.
Defaults to "password".
extra_fields
Array reference of key => value pairs, representing additional form
fields to submit.
( run in 0.849 second using v1.01-cache-2.11-cpan-d7f47b0818f )