view release on metacpan or search on metacpan
lib/HTML/Object/DOM/Element/Shared.pm view on Meta::CPAN
=over 4
=item * C<anonymous>
Requests by the underlying element have their mode set to cors and their credentials mode set to same-origin. This means that CORS is enabled and credentials are sent if the underlying element is fetched from the same origin from which the document w...
=item * C<use-credentials>
Requests by the L<HTML::Object::DOM::Element> will use the cors mode and the include credentials mode; all underlying element requests by the element will use CORS, regardless of what domain the fetch is from.
=back
If crossOrigin is an empty string (""), the anonymous mode is selected.
view all matches for this distribution
view release on metacpan or search on metacpan
t/templates/loopdeloop.tmpl view on Meta::CPAN
<http://use.perl.org/images/pix.gif>
[CPAN] Jesse writes "I'm pleased to announce the public beta of rt.cpan.org, a public bug tracking system for every distribution in the CPAN. Anybody can use the public interface to look at current and past bugs in distributions and to report new bug...
Over the next couple weeks, I'd like the community to put the system through its paces, so we can work out the kinks before we invite the masses to start reporting bugs.
Authors can sign in with their PAUSE credentials to work with and resolve bugs. If you don't have a PAUSE account or if RT's concept of your list of distributions looks wrong, send mail to jesse+cpan@bestpractical.com and I'll take care of it.
In addition to the web interface, anyone can report a bug in a distribution by sending mail to bug-distname@rt.cpan.org (ex: bug-dbix-searchbuilder@rt.cpan.org)."
view all matches for this distribution
view release on metacpan or search on metacpan
third_party/modest/include/myurl/parser.h view on Meta::CPAN
myurl_utils_data_copy_set(url, &data[ url->begin ], (data_length - url->begin), &to, &to ## _length)
#define myurl_parser_append_buffer(url, data, begin, data_length, to) \
myurl_utils_data_copy_append(url, &data[ begin ], (data_length - begin), &to, &to ## _length)
#define myurl_parser_is_includes_credentials(url_entry) (url_entry->username_length || url_entry->password_length)
#ifdef __cplusplus
extern "C" {
#endif
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HTTP/DAV/Browse.pm view on Meta::CPAN
sub _dav_init {
my $self = shift;
my $dav = new HTTP::DAV;
$dav->credentials(
$self->username,
$self->password,
$self->base_uri,
$self->realm,
);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HTTP/DAV.pm view on Meta::CPAN
}
sub get_lockedresourcelist { $_[0]->{_lockedresourcelist} }
# SET
sub set_workingresource { $_[0]->{_workingresource} = $_[1]; }
sub credentials { shift->{_comms}->credentials(@_); }
######################################################################
# Error handling
## Error conditions
lib/HTTP/DAV.pm view on Meta::CPAN
use HTTP::DAV;
$d = HTTP::DAV->new();
$url = "http://host.org:8080/dav/";
$d->credentials(
-user => "pcollins",
-pass => "mypass",
-url => $url,
-realm => "DAV Realm"
);
lib/HTTP/DAV.pm view on Meta::CPAN
{ "X-My-Header" => "value", ... }
or a L<HTTP::Headers> object.
=item B<credentials(USER,PASS,[URL],[REALM])>
sets authorization credentials for a C<URL> and/or C<REALM>.
When the client hits a protected resource it will check these credentials to see if either the C<URL> or C<REALM> match the authorization response.
Either C<URL> or C<REALM> must be provided.
returns no value
Example:
$d->credentials( -url=>'myhost.org:8080/test/',
-user=>'pcollins',
-pass=>'mypass');
=item B<DebugLevel($val)>
view all matches for this distribution
view release on metacpan or search on metacpan
is($res->code, 401);
$auth = MIME::Base64::encode("user:passwd");
$req->header(Authorization => 'Basic ' . $auth);
# Then illegal credentials
$res = $ua->request($req);
is($res->code, 401);
#----------------------------------------------------------------
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HTTP/Headers/ActionPack/Authorization/Basic.pm view on Meta::CPAN
use parent 'HTTP::Headers::ActionPack::Core::Base';
sub BUILDARGS {
my $class = shift;
my $type = shift || confess "Must specify type";
my $credentials = shift || confess "Must provide credentials";
if ( ref $credentials && ref $credentials eq 'HASH' ) {
return +{ auth_type => $type, %$credentials };
}
elsif ( ref $credentials && ref $credentials eq 'ARRAY' ) {
my ($username, $password) = @$credentials;
return +{ auth_type => $type, username => $username, password => $password };
}
else {
my ($username, $password) = split ':' => decode_base64( $credentials );
return +{ auth_type => $type, username => $username, password => $password };
}
}
sub new_from_string {
my ($class, $header_string) = @_;
my ($type, $credentials) = split /\s/ => $header_string;
($type eq 'Basic')
|| confess "The type must be 'Basic', not '$type'";
$class->new( $type, $credentials );
}
sub auth_type { (shift)->{'auth_type'} }
sub username { (shift)->{'username'} }
sub password { (shift)->{'password'} }
lib/HTTP/Headers/ActionPack/Authorization/Basic.pm view on Meta::CPAN
=head1 METHODS
=over 4
=item C<new ( $type, $credentials )>
The C<$credentials> argument can either be a Base64 encoded string (as
would be passed in via the header), a HASH ref with username and password
keys, or a two element ARRAY ref where the first element is the username
and the second the password.
=item C<new_from_string ( $header_string )>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HTTP/Promise/Headers.pm view on Meta::CPAN
# NOTE: Allow is a response header
# <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Allow>
sub allow { return( shift->_set_get_multi( 'Allow', @_ ) ); }
# Response header: <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Credentials>
sub allow_credentials { return( shift->_set_get_one( 'Access-Control-Allow-Credentials', @_ ) ); }
# Response header <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Headers>
sub allow_headers { return( shift->_set_get_multi( 'Access-Control-Allow-Headers', @_ ) ); }
# <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Methods>
lib/HTTP/Promise/Headers.pm view on Meta::CPAN
This is a server response header.
See L<rfc7231, section 7.4.1|https://tools.ietf.org/html/rfc7231#section-7.4.1> and L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Age>
=head2 allow_credentials
# Access-Control-Allow-Credentials: true
$h->allow_credentials( 'true' );
Sets or gets the C<Access-Control-Allow-Credentials> header field value. It takes a string boolean value: C<true> or C<false>.
See L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Credentials>
view all matches for this distribution
view release on metacpan or search on metacpan
eg/proxy-auth.pl view on Meta::CPAN
$proxy->push_filter(
request => HTTP::Proxy::HeaderFilter::simple->new(
sub {
my ( $self, $headers, $request ) = @_;
# check the token against all credentials
my $ok = 0;
$_ eq $token && $ok++
for $self->proxy->hop_headers->header('Proxy-Authorization');
# no valid credential
view all matches for this distribution
view release on metacpan or search on metacpan
QuickBase.pm view on Meta::CPAN
'apptoken' => "",
'error' => undef,
'errortext' => undef,
'username' => undef,
'password' => undef,
'credentials' => undef,
'proxy' => undef,
'realmhost' => undef
}, $class;
}
QuickBase.pm view on Meta::CPAN
my($self, $username, $password) = @_;
$self->{'username'} = $username;
$self->{'password'} = $password;
$username = $self->xml_escape($username);
$password = $self->xml_escape($password);
$self->{'credentials'} = "<username>$username<\/username><password>$password<\/password>";
$self->{'ticket'}="";
return "";
}
sub setAppToken($)
QuickBase.pm view on Meta::CPAN
#First we have to get the authorization ticket
#We do this by posting the QuickBase username and password to QuickBase
#This is where we post the QuickBase username and password
my $res = $self->PostAPIURL ("main", "API_Authenticate",
"<qdbapi>".
$self->{'credentials'}.
"</qdbapi>");
if ($res->content =~ /<errcode>(.*?)<\/errcode>.*?<errtext>(.*?)<\/errtext>/s)
{
$self->{'error'} = $1;
$self->{'errortext'} = $2;
QuickBase.pm view on Meta::CPAN
}
if ($self->{'error'} eq '0')
{
$res->content =~ /<ticket>(.*?)<\/ticket>/s;
$self->{'ticket'} = $1;
$self->{'credentials'} = "<ticket>$self->{'ticket'}<\/ticket>";
}
else
{
return "";
}
QuickBase.pm view on Meta::CPAN
}
$req->content_type('text/xml');
$req->header('QUICKBASE-ACTION' => "$action");
if ($self->{'apptoken'} ne "" && $self->{'credentials'} !~ /<apptoken>/)
{
$self->{'credentials'} .= "<apptoken>".$self->{'apptoken'}."</apptoken>";
}
if($content =~ /^<qdbapi>/)
{
$content =~s/^<qdbapi>/<qdbapi>$self->{'credentials'}/;
}
elsif($content eq "" || !defined($content))
{
$content ="<qdbapi>$self->{'credentials'}</qdbapi>";
}
if($content =~ /^<qdbapi>/)
{
$content = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>" . $content;
}
QuickBase.pm view on Meta::CPAN
return $res;
}
if (defined ($res->header('Set-Cookie')) && $res->header('Set-Cookie') =~ /TICKET=(.+?);/)
{
$self->{'ticket'} = $1;
$self->{'credentials'} = "<ticket>$self->{'ticket'}</ticket>";
}
elsif ($res->content =~ /<ticket>(.+?)<\/ticket>/)
{
$self->{'ticket'} = $1;
$self->{'credentials'} = "<ticket>$self->{'ticket'}</ticket>";
}
$res->content =~ /<errcode>(.*?)<\/errcode>.*?<errtext>(.*?)<\/errtext>/s;
$self->{'error'} = $1;
$self->{'errortext'} = $2;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HTTP/Request/CurlParameters.pm view on Meta::CPAN
default => sub { {} },
);
=item *
C<credentials>
credentials => 'hunter2:secret'
The credentials to use for basic authentication.
=cut
has credentials => (
is => 'ro',
);
=item *
lib/HTTP/Request/CurlParameters.pm view on Meta::CPAN
maybe timeout => $self->timeout,
maybe cookie_jar => $init_cookie_jar->{code},
maybe SSL_opts => keys %ssl_options ? \%ssl_options : undef,
], '')
;
if( defined( my $credentials = $self->credentials )) {
my( $user, $pass ) = split /:/, $credentials, 2;
my $setup_credentials = sprintf qq{\$ua->credentials("%s","%s");},
quotemeta $user,
quotemeta $pass;
push @setup_ua, $setup_credentials;
};
if( $self->show_error ) {
push @postamble,
' die $res->message if $res->is_error;',
} elsif( $self->fail ) {
lib/HTTP/Request/CurlParameters.pm view on Meta::CPAN
maybe max_size => $self->max_filesize,
maybe cookie_jar => $init_cookie_jar->{code},
maybe SSL_options => keys %ssl_options ? \%ssl_options : undef,
], '')
;
if( defined( my $credentials = $self->credentials )) {
my( $user, $pass ) = split /:/, $credentials, 2;
my $setup_credentials = sprintf qq{\$ua->credentials("%s","%s");},
quotemeta $user,
quotemeta $pass;
push @setup_ua, $setup_credentials;
};
@setup_ua = ()
if @setup_ua == 1;
lib/HTTP/Request/CurlParameters.pm view on Meta::CPAN
maybe max_response_size => $self->max_filesize,
maybe cookie_jar => $init_cookie_jar->{code},
maybe SSL_options => keys %ssl_options ? \%ssl_options : undef,
], '')
;
if( defined( my $credentials = $self->credentials )) {
my( $user, $pass ) = split /:/, $credentials, 2;
my $setup_credentials = sprintf qq{\$ua->userinfo("%s","%s");},
quotemeta $user,
quotemeta $pass;
push @setup_ua, $setup_credentials;
};
@setup_ua = ()
if @setup_ua == 1;
view all matches for this distribution
view release on metacpan or search on metacpan
$url = "http://127.0.0.1:1024/index.html";
$response = $ua->get($url);
is($response->code, 401, "Response has HTTP Base Authorization (401) status");
$ua->credentials( "127.0.0.1:1024", "Colonel Authentication System", "username", "passwd" );
$response = $ua->get($url);
is($response->code, 200, "Response has HTTP OK (2xx) status");
$url = "http://127.0.0.1:1024/page_no_found";
$response = $ua->get($url);
view all matches for this distribution
view release on metacpan or search on metacpan
Singlethreaded.pm view on Meta::CPAN
as an example of featureitis.
=head2 $uid and $gid
when starting as root in a *nix, specify these numerically. The
process credentials will be changed after the listening sockets
are bound.
=head1 Dynamic Reconfiguration
Dynamic reconfiguration is possible, either by directly altering
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HTTP/Size.pm view on Meta::CPAN
=head1 TO DO
* if i have to use GET, i should use Byte-Ranges to avoid
downloading the whole thing
* add a way to specify Basic Auth credentials
* download javascript and style sheets too.
=head1 SEE ALSO
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HTTP/Throwable/Role/Status/Unauthorized.pm view on Meta::CPAN
The request requires user authentication. The response MUST include a
WWW-Authenticate header field containing a challenge applicable to the
requested resource. The client MAY repeat the request with a suitable
Authorization header field. If the request already included Authorization
credentials, then the 401 response indicates that authorization has been
refused for those credentials. If the 401 response contains the same
challenge as the prior response, and the user agent has already attempted
authentication at least once, then the user SHOULD be presented the entity
that was given in the response, since that entity might include relevant
diagnostic information.
lib/HTTP/Throwable/Role/Status/Unauthorized.pm view on Meta::CPAN
#pod
#pod The request requires user authentication. The response MUST include a
#pod WWW-Authenticate header field containing a challenge applicable to the
#pod requested resource. The client MAY repeat the request with a suitable
#pod Authorization header field. If the request already included Authorization
#pod credentials, then the 401 response indicates that authorization has been
#pod refused for those credentials. If the 401 response contains the same
#pod challenge as the prior response, and the user agent has already attempted
#pod authentication at least once, then the user SHOULD be presented the entity
#pod that was given in the response, since that entity might include relevant
#pod diagnostic information.
#pod
view all matches for this distribution
view release on metacpan or search on metacpan
example/testdefs.xml view on Meta::CPAN
<user_agent>Mozilla/5.0 (HTTP-WebTest)</user_agent>
<!-- send to these mail addresses (element may be repeated) -->
<mail_addresses>NOC <noc@isp.tld></mail_addresses>
<mail_from>WebTest <webtest@isp.tld></mail_from>
<!-- do not specify the email element for now; this will break the XML report -->
<!-- basic auth. credentials, used if requested by http server -->
<auth>user</auth>
<auth>secretpass</auth>
</param>
<!-- test groups specify tests to apply to a html page
view all matches for this distribution
view release on metacpan or search on metacpan
t/testdefs.xml view on Meta::CPAN
<list name="mail_addresses">
<param>NOC <noc@isp.tld></param>
</list>
<param name="mail_from">WebTest <webtest@isp.tld></param>
<!-- do not specify the email element for now; this will break the XML report -->
<!-- basic auth. credentials, used if requested by http server -->
<list name="auth">
<param>user</param>
<param>secretpass</param>
</list>
</params>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HTTP/WebTest/SelfTest.pm view on Meta::CPAN
@EXPORT = qw($HOSTNAME $PORT $URL
abs_url
check_webtest
read_file write_file
generate_testfile canonical_output compare_output
parse_basic_credentials
start_webserver stop_webserver);
use Algorithm::Diff qw(diff);
use MIME::Base64;
use URI;
lib/HTTP/WebTest/SelfTest.pm view on Meta::CPAN
printf "%s %03d %s\n", @$diff_str;
}
}
}
=head2 parse_basic_credentials($credentials)
Decodes credentials for Basic authorization scheme according RFC2617.
=head3 Returns
Returns user/password pair.
=cut
sub parse_basic_credentials {
my $credentials = shift;
return () unless defined $credentials;
$credentials =~ m|^ \s* Basic \s+ ([A-Za-z0-9+/=]+) \s* $|x;
my $basic_credentials = $1;
return () unless defined $basic_credentials;
my $user_pass = decode_base64($basic_credentials);
my($user, $password) = $user_pass =~ /^ (.*) : (.*) $/x;
return () unless defined $password;
return ($user, $password);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Haineko.pm view on Meta::CPAN
Defines "mailer table" which decide the mailer by sender's domain part.
=head2 C<etc/authinfo>
Provide credentials for client side authentication information. Credentials
defined in this file are used at relaying an email to external SMTP server.
This file should be set secure permission: The only user who runs haineko server
can read this file.
view all matches for this distribution
view release on metacpan or search on metacpan
Word/noun.txt view on Meta::CPAN
creation,creations
creationist,creationists
creator,creators
creature,creatures
creche,creches
credential,credentials
credit,credits
creditor,creditors
creed,creeds
creek,creeks
creel,creels
view all matches for this distribution
view release on metacpan or search on metacpan
t/HealthCheck-Diagnostic-SSH.t view on Meta::CPAN
$hc = HealthCheck::Diagnostic::SSH->new( %default );
$res = $hc->check;
is $res, {
%success_res,
info => "Successful connection for $user\@$host SSH",
}, "Healthcheck completed using local user credentials";
# health check should fail with incorrect user overriden
$res = $hc->check( user => 'invalid-user' );
like $res->{info}, qr/invalid-user.*Permission denied/,
"Healthcheck result displays overridden parameters";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Hetula/Client.pm view on Meta::CPAN
use Data::Printer;
=head3 new
@param1 {HASHRef} baseURL => https://hetula.example.com
credentials => filepath, Where to load the credentials file.
see slurpCredentials() for more info.
=cut
sub new($class, $params) {
slurpCredentials($params->{credentials}, $params) if ($params->{credentials});
_detectKohaEnvironment($params);
die("Hetula::Client::BadParam - parameter 'baseURL' is missing") unless $params->{baseURL};
die("Hetula::Client::BadParam - parameter 'baseURL' '$params->{baseURL}' is not a valid URI") unless $params->{baseURL} =~ /$RE{URI}{HTTP}{-scheme=>qr!https?!}/;
my $s = bless(Storable::dclone($params), $class);
lib/Hetula/Client.pm view on Meta::CPAN
=head3 login
See Hetula API doc for endpoint POST /api/v1/auth
@param1 {HASHRef} username => String || undef if given via credentials during construction,
password => String || undef if given via credentials during construction,
organization => String || undef if given via credentials during construction,
=cut
sub login($s, $params={}) {
$params->{username} = $s->{username} unless $params->{username};
lib/Hetula/Client.pm view on Meta::CPAN
=head2 HELPERS
=head3 slurpCredentials
@static
Reads the contents of a credentials file.
The credentials file must consist of up to 4 lines, with each line
specifying the following commandline argument replacements:
username
password
organization
url
@param1 {String} Path to the credentials file
@param2 {HASHRef} Optional, HASHRef where to inject the found credentials
=cut
sub slurpCredentials($credentialsFile, $injectHere=undef) {
open(my $FH, '<:encoding(UTF-8)', $credentialsFile) or die("Couldn't read '$credentialsFile': $!");
my $username = <$FH>; if ($username) { chomp($username); $injectHere->{username} = $username if $username && $injectHere; }
my $password = <$FH>; if ($password) { chomp($password); $injectHere->{password} = $password if $password && $injectHere; }
my $organization = <$FH>; if ($organization) { chomp($organization); $injectHere->{organization} = $organization if $organization && $injectHere; }
my $baseURL = <$FH>; if ($baseURL) { chomp($baseURL); $injectHere->{baseURL} = $baseURL if $baseURL && $injectHere; }
return ($username, $password, $organization, $baseURL);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HoneyClient/Manager/VM.pm view on Meta::CPAN
our $chdirSemaphore = Thread::Semaphore->new(1);
# Constants used to authenticate with the VMware Server /
# GSX server.
# If username and password are left undefined,
# the process owner's credentials will be used.
our $serverName : shared = undef;
our $tcpPort : shared = getVar(name => "vmware_port");
our $username : shared = undef;
our $passwd : shared = undef;
lib/HoneyClient/Manager/VM.pm view on Meta::CPAN
_emitQueuedFault();
# Define the parameters used to connect to the VMware Server / GSX server.
# If any of these parameters are undefined, defaults will be used.
# For example, the process owner's credentials will be used
# for username/passwd if undefined.
$connectParams = VMware::VmPerl::ConnectParams::new($serverName, $tcpPort, $username, $passwd);
# Establish a persistent connection with server.
$server = VMware::VmPerl::Server::new();
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Hopkins/Plugin/HMI/Catalyst/Controller/Root.pm view on Meta::CPAN
sub login_POST : Private
{
my $self = shift;
my $c = shift;
my $credentials = {};
$credentials->{username} = scalar $c->req->params->{username};
$credentials->{password} = scalar $c->req->params->{password};
$c->detach('/default') if $c->authenticate($credentials);
$c->stash->{error} = 'login incorrect';
$c->detach('/login_GET');
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Hubot/Scripts/tweet.pm view on Meta::CPAN
. uri_escape( $ENV{HUBOT_TWITTER_CONSUMER_SECRET} )
}
);
$client->post(
{ grant_type => 'client_credentials' },
sub {
my ( $body, $hdr ) = @_;
return if !$body;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/I22r/Translate/Microsoft.pm view on Meta::CPAN
$token->{secretx} = url_encode( $secret );
}
$token->{client_idx} = url_encode( $client_id );
my $content = join( '&',
'grant_type=client_credentials',
'client_id=' . $token->{client_idx},
'client_secret=' . $token->{secretx},
'scope=http://api.microsofttranslator.com/' );
my $headers = HTTP::Headers->new(
lib/I22r/Translate/Microsoft.pm view on Meta::CPAN
This package interacts with the Microsoft Translator API,
which requires some you/us to provide a "client id" and
"client secret" to access Microsoft's data services.
As of October 2012, here are the steps you need to take
to get those credentials. (If these steps don't work anymore,
and you do figure out what steps you need to do, L<let me
know|mailto:mob@cpan.org> or L<file a bug report|"SUPPORT">
and I'll update this document.
=over 4
lib/I22r/Translate/Microsoft.pm view on Meta::CPAN
ENABLED => 1,
CLIENT_ID => "angus",
SECRET => "ykiDjfQ9lztW/oFUC4t2ciPWH2nJS88FqXcQbs/Z9Y=7"
} );
(these are not real credentials).
=back
=head1 AUTHOR
view all matches for this distribution