Added missing Realm, without auth didnt work.

This commit is contained in:
Florian Asche 2014-03-27 13:06:42 +01:00
parent f5afad0b8b
commit 8342fc6820
4 changed files with 15 additions and 2 deletions

View File

@ -49,7 +49,7 @@ sub connect {
my $content;
if (defined $self->{option_results}->{credentials}) {
$ua->credentials($self->{option_results}->{hostname}.':'.$self->{option_results}->{port},$self->{option_results}->{username},$self->{option_results}->{password});
$ua->credentials($self->{option_results}->{hostname}.':'.$self->{option_results}->{port},$self->{option_results}->{realm},$self->{option_results}->{username},$self->{option_results}->{password});
}
if ($self->{option_results}->{proto} eq "https") {

View File

@ -56,6 +56,7 @@ sub new {
"credentials" => { name => 'credentials' },
"username:s" => { name => 'username' },
"password:s" => { name => 'password' },
"realm:s" => { name => 'realm', default => 'Authentification' },
"proxyurl:s" => { name => 'proxyurl' },
"warning:s" => { name => 'warning' },
"critical:s" => { name => 'critical' },
@ -209,7 +210,9 @@ Specify username for basic authentification (Mandatory if --credentials is speci
Specify password for basic authentification (Mandatory if --credentials is specidied)
=item B<--password>
=item B<--realm>
Credentials Realm (Default: 'Authentification')
=item B<--timeout>

View File

@ -57,6 +57,7 @@ sub new {
"credentials" => { name => 'credentials' },
"username:s" => { name => 'username' },
"password:s" => { name => 'password' },
"realm:s" => { name => 'realm', default => 'Authentification' },
"proxyurl:s" => { name => 'proxyurl' },
"warning:s" => { name => 'warning' },
"critical:s" => { name => 'critical' },
@ -175,6 +176,10 @@ Specify username for basic authentification (Mandatory if --credentials is speci
Specify password for basic authentification (Mandatory if --credentials is specidied)
=item B<--realm>
Credentials Realm (Default: 'Authentification')
=item B<--proxyurl>
Proxy URL if any

View File

@ -56,6 +56,7 @@ sub new {
"credentials" => { name => 'credentials' },
"username:s" => { name => 'username' },
"password:s" => { name => 'password' },
"realm:s" => { name => 'realm', default => 'Authentification' },
"proxyurl:s" => { name => 'proxyurl' },
"warning:s" => { name => 'warning' },
"critical:s" => { name => 'critical' },
@ -202,6 +203,10 @@ Specify username for basic authentification (Mandatory if --credentials is speci
Specify password for basic authentification (Mandatory if --credentials is specidied)
=item B<--realm>
Credentials Realm (Default: 'Authentification')
=item B<--timeout>
Threshold for HTTP timeout