Authen-Simple-WebForm
view release on metacpan or search on metacpan
lib/Authen/Simple/WebForm.pm view on Meta::CPAN
=over
=item initial_url
A URL to go to prior to logging in.
If the login page requires you to go to some page prior to posting, use this.
It will accept and store any cookies returned, and use this page as the
referrer when submitting to the login form.
Off by default.
=item initial_expect
String or a compiled regex (eg. C<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.
=item initial_expect_cookie
String or a compiled regex (eg. C<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.
=item 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).
=item 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".
=item login_url
REQUIRED
The URL to which the login credentials will be submitted.
For example: https://host.company.com/login.pl
=item login_expect
String or a compiled regex (eg. C<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 L<Apache::AuthCookie>, which
will return a 403 Forbidden error code when authentication fails.
Off by default.
=item login_expect_cookie
String or a compiled regex (eg. C<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 co...
NOTE: this matches the cookie key, and the value must simple have some length.
Off by default.
=item 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).
=item 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".
=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.
( run in 0.616 second using v1.01-cache-2.11-cpan-39bf76dae61 )