Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jhthorsen/mojo-useragent-digestauth
Allow Mojo::UserAgent to execute digest auth requests
https://github.com/jhthorsen/mojo-useragent-digestauth
Last synced: 27 days ago
JSON representation
Allow Mojo::UserAgent to execute digest auth requests
- Host: GitHub
- URL: https://github.com/jhthorsen/mojo-useragent-digestauth
- Owner: jhthorsen
- Created: 2015-04-14T07:55:05.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2021-07-10T05:54:37.000Z (over 3 years ago)
- Last Synced: 2024-10-16T11:58:29.778Z (3 months ago)
- Language: Perl
- Size: 25.4 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- Changelog: Changes
Awesome Lists containing this project
README
NAME
Mojo::UserAgent::DigestAuth - Allow Mojo::UserAgent to execute digest
auth requestsVERSION
0.04DESCRIPTION
Mojo::UserAgent::DigestAuth is a Mojo::UserAgent "plugin" which can
handle 401 digest auth responses from the server.See .
SYNOPSIS
use Mojo::UserAgent::DigestAuth;
my $ua = Mojo::UserAgent->new;# blocking
$tx = $ua->$_request_with_digest_auth($method, $url, $headers);# non-blocking
$ua = $ua->$_request_with_digest_auth($method, $url, $headers, $cb);
$ua = $ua->$_request_with_digest_auth($method, $url, $cb);$ua = $ua->$_request_with_digest_auth(
get => "http://example.com", sub {
my ($ua, $tx) = @_;
}
);A custom client nonce can be specified by using a special
"D-Client-Nonce" header. This is a hack to work around servers which
does not understand the nonce generated by this module.Note that this feature is EXPERIMENTAL and might be removed once I
figure out why the random nonce does not work
for
all servers.$ua = $ua->$_request_with_digest_auth(
get => { "D-Client-Nonce" => "0e163838ccd62299" },
"http://example.com", sub {
my ($ua, $tx) = @_;
}
);COPYRIGHT AND LICENSE
Copyright (C) 2014, Jan Henning ThorsenThis program is free software, you can redistribute it and/or modify it
under the terms of the Artistic License version 2.0.AUTHOR
Jan Henning Thorsen - "[email protected]"