view release on metacpan or search on metacpan
lib/GitHub/Authorization.pm view on Meta::CPAN
=head3 On failure/error...
On failure, we confess() our sins:
Failed: 401/Unauthorized / Bad credentials ...
That is, we L<Carp/confess> with the status code, status message, and the
message returned from GitHub itself.
=head2 legal_scopes
view all matches for this distribution
view release on metacpan or search on metacpan
lib/GitHub/RSS.pm view on Meta::CPAN
=item *
B<token_file> - name and path of the JSON-format token file containing the
GitHub API token By default, that file is searched for under the name
C<github.credentials> in C<.>, C<$ENV{XDG_DATA_HOME}>, C<$ENV{USERPROFILE}>
and C<$ENV{HOME}>.
=cut
has 'token_file' => (
lib/GitHub/RSS.pm view on Meta::CPAN
$ENV{XDG_DATA_HOME},
$ENV{USERPROFILE},
$ENV{HOME}
) {
next unless defined $candidate_dir;
if( -f "$candidate_dir/github.credentials" ) {
$token_file = "$candidate_dir/github.credentials";
last
};
};
return $token_file
view all matches for this distribution
view release on metacpan or search on metacpan
author/header.pm view on Meta::CPAN
Note that this distribution also includes the L<gitlab-api-v3> command-line
interface (CLI).
=head1 CREDENTIALS
Authentication credentials may be defined by setting either the L</token>,
the L</login> and L</password>, or the L</email> and L</password> arguments.
When the object is constructed the L</login>, L</email>, and L</password>
arguments are used to call L</session> to generate a token. The token is
saved in the L</token> attribute, and the login/email/password arguments
are discarded.
If no credentials are supplied then the client will be anonymous and greatly
limited in what it can do with the API.
=head2 CONSTANTS
Several values in the GitLab API require looking up the numeric value
view all matches for this distribution
view release on metacpan or search on metacpan
author/header.pm view on Meta::CPAN
C<git diff 72e384775c9570f60f8ef68dee3a1eecd347fb69..HEAD -- author/sections/>
=head2 Credentials
Authentication credentials may be defined by setting either the L</access_token>
or L</private_token> arguments.
If no credentials are supplied then the client will be anonymous and greatly
limited in what it can do with the API.
Extra care has been taken to hide the token arguments behind closures. This way,
if you dump your api object, your tokens won't accidentally leak into places you
don't want them to.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBD/Gofer/Transport/http.pm view on Meta::CPAN
timeout => $self->go_timeout, # undef by default
keep_alive => $CONN_CACHE, # sets total_capacity of LWP::ConnCache
env_proxy => 1, # XXX
);
$useragent->agent(join "/", __PACKAGE__, $DBI::VERSION, $VERSION);
#$useragent->credentials( $netloc, $realm, $uname, $pass ); XXX
$useragent->parse_head(0); # don't parse html head
$useragent;
};
my $content = $frozen_request;
view all matches for this distribution
view release on metacpan or search on metacpan
examples/oauth/authenticate_with_web_flow.pl view on Meta::CPAN
$cgi->end_html;
}
}
# This starts the OAuth2 authentication process where the user will be
# prompted to log in with the credentials that have access to their AdWords
# account. During this process, the user has to confirm that permission is
# granted for our application to access AdWords using their credentials.
sub resp_login {
my $cgi = shift;
return if !ref $cgi;
# Get AdWords Client, ~/adwords.properties will be read.
view all matches for this distribution
view release on metacpan or search on metacpan
examples/account_management/create_customer.pl view on Meta::CPAN
# limitations under the License.
#
# This example illustrates how to create a new customer under a given manager
# account.
#
# Note: This example must be run using the credentials of a Google Ads manager
# account. By default, the new account will only be accessible via the manager
# account.
use strict;
use warnings;
examples/account_management/create_customer.pl view on Meta::CPAN
# Don't run the example if the file is being included.
if (abs_path($0) ne abs_path(__FILE__)) {
return 1;
}
# Get Google Ads Client, credentials will be read from ~/googleads.properties.
my $api_client = Google::Ads::GoogleAds::Client->new();
# By default examples are set to die on any server returned fault.
$api_client->set_die_on_faults(1);
examples/account_management/create_customer.pl view on Meta::CPAN
=head1 DESCRIPTION
This example illustrates how to create a new customer under a given manager account.
Note: This example must be run using the credentials of a Google Ads manager account.
By default, the new account will only be accessible via the manager account.
=head1 SYNOPSIS
create_customer.pl [options]
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Google/Cloud/Speech.pm view on Meta::CPAN
$speech->secret_file('/my/google/app/project/sp/json/file');
To create, Google Service Account Key:
1) Login to Google Apps Console and select your project
2) Click on create credentials-> service account key.
4) Select a service account and key type as JSON and click on create and downlaoded the JSON file.
See L<Google API Doc|https://developers.google.com/identity/protocols/application-default-credentials> for more details about API authentication.
=head2 encoding
my $encoding = $speech->encoding('linear16');
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Google/CloudTasks.pm view on Meta::CPAN
use Google::CloudTasks;
my $client = Google::CloudTasks->client(
version => 'v2',
credentials_path => '/path/to/credentials.json',
);
# Create task
my $project_id = 'myproject';
my $location_id = 'asia-northeast1';
lib/Google/CloudTasks.pm view on Meta::CPAN
This is a Perl client library for the Google CloudTasks API.
=head2 AUTHENTICATION
A service account with appropriate roles is required. You need to download JSON file and specify C<credentials_path>.
See also: L<https://cloud.google.com/docs/authentication/getting-started#creating_the_service_account>
=head1 METHODS
All methods handle raw hashref (or arrayref of hashref), rather than objects.
=head2 Create a client
my $client = Google::CloudTasks->client(
version => 'v2',
credentials_path => '/path/to/credentials.json',
);
C<version> is an API version. (Currently only C<v2> is available)
C<credentials_path> is a path to a service account JSON file.
=head2 Location
Refer the detailed representation of location at L<https://cloud.google.com/tasks/docs/reference/rest/Shared.Types/ListLocationsResponse#Location>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Google/ContentAPI.pm view on Meta::CPAN
# Add, modify and delete items from the Google Merchant Center platform via
# the Content API for Shopping.
#
# https://developers.google.com/shopping-content/v2/quickstart
#
# Authentication is done via Service Account credentials. For details see:
# https://developers.google.com/shopping-content/v2/how-tos/service-accounts
#
# AUTHOR
#
# Bill Gerrard <bill@gerrard.org>
lib/Google/ContentAPI.pm view on Meta::CPAN
=head1 DESCRIPTION
Add, modify and delete items from the Google Merchant Center platform via
the Content API for Shopping.
Authentication is done via Service Account credentials. See the following for details:
L<https://developers.google.com/shopping-content/v2/how-tos/service-accounts>
You will also need to create a Merchant Center Account:
L<https://developers.google.com/shopping-content/v2/quickstart>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Google/ISBNNumbers.pm view on Meta::CPAN
sub new {
my ($class, $google_api_key) = @_;
# the API key is required
croak "Google API Key is required to use Google::ISBNNumbers.\n".
"Please set up a key at https://console.cloud.google.com/apis/credentials" unless $google_api_key;
# become self, with an HTTP::Tiny and Cpanel::JSON objects
my $self = bless {
'api_key' => $google_api_key,
'http' => HTTP::Tiny->new,
lib/Google/ISBNNumbers.pm view on Meta::CPAN
This module uses the Google Books API to retrieve basic information on a book by its
ISBN Number. The Google Books API seems to be more complete and reliable than other
resources for searching ISBN numbers.
You will need a Google API key from L<https://console.cloud.google.com/apis/credentials>.
This requires setting up a basic 'Project' in that console, but no sensitive scopes are required,
so you should be able to get the key instantly. You can read up on the Google Books API
here: L<https://developers.google.com/books>
This should be one of the simplest modules you'll encounter. The synopsis above pretty
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Google/OAuth.pm view on Meta::CPAN
=head2 Credentials
The first part of the authorization process requires establishing, and then
presenting, your credentials for authorization. These credentials start
out with a personal Google account, followed by a registration process
that describes your integration project. When registration is complete,
Google will generate and display several string values that will be used later
in the installation process. These string values are refered to as I<client
credentials>.
Create a Google account if necessary, log in, then visit Google's developer
site:
http://developers.google.com/
lib/Google/OAuth.pm view on Meta::CPAN
=item 3. One or more I<Redirect URIs>
=back 8
A fourth value, the "Email address" is not used to establish credentials.
=head2 User Authorization
Once you've established credentials, you request that Google users
authorize your application to access their account information. Your
request is in the form of a URL link. For example, during the installation
(described below), you'll email yourself a request link in order to test
your installation.
lib/Google/OAuth.pm view on Meta::CPAN
After building this package using Make or CPAN, additional installation
tasks are required:
=over 8
=item 1. Define the application credentials
=item 2. Set up the data persistence component
=back 8
lib/Google/OAuth.pm view on Meta::CPAN
caller is responsible for wrapping the HTML.
=head2 Acquire the Grant Code
Google transmits the I<Grant Code> via HTTP using the redirect_uri defined in
the client credentials. Google provides the option to define multiple
redirects, but Google::OAuth's installation process requires only one.
There are two approaches to using an alternative I<redirect_uri> definition.
In either case the definition must match one of the values in Google's API
registration. First, the I<redirect_uri> element in the client credentials
can be redefined, as with any element, using the C<setclient()> method as
follows:
my @redirect = ( ... ) ;
Google::OAuth->setclient( redirect_uri => $redirect[1] ) ;
lib/Google/OAuth.pm view on Meta::CPAN
=back 8
=head2 Google::OAuth::Client
Methods that need to access the client credentials are defined under
the C<Google::OAuth::Client> module. In the context of this package,
the methods are independent of token object data.
=head3 setclient()
lib/Google/OAuth.pm view on Meta::CPAN
=item 2. Default values defined within the C<token_request()> method.
=item 3. Scope definitions defined by the C<scope()> method.
=item 4. Client credentials defined in C<Google::OAuth::Config>.
=item 5. Client credentials defined by C<< Google::OAuth->setclient() >>.
=back 8
=head3 get_token()
lib/Google/OAuth.pm view on Meta::CPAN
=head2 Google::OAuth::Config
C<Google::OAuth::Config> is generated during the installation process, and
contains the definitions of the client credentials and DSN.
C<Google::OAuth::Config::setclient()> is its only defined method.
=head1 SECURE INSTALLATION
Since the client credentials are built into the installation, some
tweaking is required to use Google::OAuth in a shared environment.
The easiest would be a simple launch script as follows:
use Google::OAuth ;
lib/Google/OAuth.pm view on Meta::CPAN
A more urgent concern is restricting access to Google::OAuth data in a
multi-user environment. There are basically two concerns:
=over 8
=item 1. Access to the client credentials
=item 2. Access to user tokens in the DSN
=back 8
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Google/OAuth2/Client/Simple.pm view on Meta::CPAN
A client library that talks to Googles OAuth 2.0 API, found at:
https://developers.google.com/identity/protocols/OAuth2WebServer
Provides methods to cover the whole OAuth flow to get an access token and connect to the Google API.
To get credentials, register your app by following the instructions under "Creating web application credentials":
https://developers.google.com/identity/protocols/OAuth2WebServer
Valid scopes can be found here:
https://developers.google.com/identity/protocols/googlescopes
view all matches for this distribution
view release on metacpan or search on metacpan
t/605_basic_grpc.t view on Meta::CPAN
$d->load_file("grpc/greeter.proto");
$d->map(
{ package => 'helloworld', prefix => 'Helloworld', options => { client_services => 'grpc_xs' } },
);
my $credentials = Grpc::XS::ChannelCredentials::createInsecure;
my $greeter = Helloworld::Greeter->new(
server_address,
credentials => $credentials,
);
my $request = Helloworld::HelloRequest->new({
name => 'grpc-perl',
});
my $call = $greeter->SayHello( argument => $request );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Google/RestApi/Auth/ServiceAccount.pm view on Meta::CPAN
);
$self = $check->(%$self);
$self = bless $self, $class;
my $auth = WWW::Google::Cloud::Auth::ServiceAccount->new(
credentials_path => $self->{account_file},
# undocumented feature of WWW::Google::Cloud::Auth::ServiceAccount
scope => join(' ', @{ $self->{scope} }),
);
$self->{auth} = $auth;
view all matches for this distribution
view release on metacpan or search on metacpan
t/01-corpus.json view on Meta::CPAN
"303": {
"description": "duplicate report",
"schema": { "$ref": "#/definitions/Error" }
},
"401": {
"description": "invalid credentials",
"schema": { "$ref": "#/definitions/Error" }
},
"400": {
"description": "report contains errors",
"schema": { "$ref": "#/definitions/Error" }
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Grimlock/Web/Controller/User.pm view on Meta::CPAN
'/user/browse', [ $c->user->obj->userid ]
)
);
}
$c->flash( message => "Incorrect credentials" );
$c->res->redirect(
$c->uri_for_action('/user/login')
);
}
view all matches for this distribution
view release on metacpan or search on metacpan
* Bitbucket Server (nee Stash)
* Gitosis
## Repository Helpers
These helpers allow you to store your credentials in a `group-git.yml`
configuration file and will find all repositories you have access to. If you
use the `group-git pull` command it will automatically clone any repository
not currently downloaded for you.
## Tagging repositories
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Grpc/Client/AbstractCall.pm view on Meta::CPAN
my $method = shift;
my $serialize = shift;
my $deserialize = shift;
my $options = shift || {};
my $timeout = $options->{timeout};
my $call_credentials_callback = $options->{call_credentials_callback};
my $deadline;
if (defined($timeout) && $timeout =~ /^\d+$/) {
my $now = Grpc::XS::Timeval::now();
my $delta = new Grpc::XS::Timeval($timeout);
lib/Grpc/Client/AbstractCall.pm view on Meta::CPAN
$deadline = Grpc::XS::Timeval::infFuture();
}
my $call = new Grpc::XS::Call($channel, $method, $deadline);
my $call_credentials;
if (defined($call_credentials_callback)) {
$call_credentials = Grpc::XS::CallCredentials::createFromPlugin(
$call_credentials_callback);
$call->setCredentials($call_credentials);
}
my $self = {
'_call' => $call,
'_channel' => $channel, ## keep in scope together with call
lib/Grpc/Client/AbstractCall.pm view on Meta::CPAN
return $self->{_deserialize}($value);
}
## Set the CallCredentials for the underlying Call.
##
## @param CallCredentials $call_credentials The CallCredentials
## object
sub setCallCredentials {
my $self = shift;
my $call_credentials = shift;
$self->{_call}->setCredentials($call_credentials);
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
share/public/guaclite.js view on Meta::CPAN
this.onpipe = null;
/**
* Fired when a "required" instruction is received. A required instruction
* indicates that additional parameters are required for the connection to
* continue, such as user credentials.
*
* @event
* @param {String[]} parameters
* The names of the connection parameters that are required to be
* provided for the connection to continue.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Gungho/Component/Authentication/Basic.pm view on Meta::CPAN
sub setup
{
my $self = shift;
$self->basic_authentication({});
my $list = $self->config->{credentials}{basic};
if ($list) {
foreach my $conf (@$list) {
$self->set_basic_credentials(@$conf);
}
}
$self->next::method(@_);
}
sub authenticate
{
my ($self, $proxy, $auth_param, $req, $res) = @_;
my ($user, $pass) = $self->get_basic_credentials($req->url, $auth_param->{realm});
return 0 unless defined $user and defined $pass;
my $auth_header = $proxy ? "Proxy-Authorization" : "Authorization";
my $auth_value = "Basic " . MIME::Base64::encode("$user:$pass", "");
lib/Gungho/Component/Authentication/Basic.pm view on Meta::CPAN
$self->send_request($referral);
return 1;
}
sub set_basic_credentials
{
my $self = shift;
my ($uri, $realm, $uid, $pass) = @_;
if (! eval { $uri->isa('URI') }) {
lib/Gungho/Component/Authentication/Basic.pm view on Meta::CPAN
}
$self->basic_authentication()->{lc ($uri->host_port)}{$realm} = [$uid, $pass];
}
sub get_basic_credentials
{
my $self = shift;
my ($uri, $realm) = @_;
if (! eval { $uri->isa('URI') }) {
lib/Gungho/Component/Authentication/Basic.pm view on Meta::CPAN
=head1 SYNOPSIS
---
components:
- Authentication::Basic
credentials:
basic:
-
- http://example.com
- "Admin Only"
- username
lib/Gungho/Component/Authentication/Basic.pm view on Meta::CPAN
=head2 authenticate($is_proxy, $realm, $request, $response)
Does the WWW Authentication and redispatches the request
=head2 set_basic_credentials($uri, $realm, $uid, $pass)
Sets the credentials for a uri + realm.
=head2 get_basic_credentials($uri, $realm)
Get the credentials for a uri + realm.
=head1 CAVEATS
This component merely stores data in Gungho that can be used for authentication.
The Engine type that Gungho is currently using must respect the information.
view all matches for this distribution
view release on metacpan or search on metacpan
t/resources/bad-example-1.log view on Meta::CPAN
mysqldump database XXXXXXXXXXX.sql
mysqldump database XXXXXXXXXXX.sql
Mysqldump done
Snapshots taken by ec2-automate-backup-awscli.sh will be eligible for purging after the following date (the purge after date given in seconds from epoch): 1450490597.
A client error (AuthFailure) occurred when calling the DescribeVolumes operation: AWS was not able to validate the provided access credentials
An error occurred when running ec2-describe-volumes. The error returned is below:
Backup done
--------------------------------------------------------------------------------
Starting KAAHE Backup -- 13-09-2015
view all matches for this distribution
view release on metacpan or search on metacpan
t/11_collect_links.t view on Meta::CPAN
#note explain $links;
is_deeply $links,
{
'icon' => [
{'crossorigin' => 'use-credentials', 'href' => 'https://resources.whatwg.org/logo.svg'},
{'href' => 'https://resources.whatwg.org/logo.svg'}
],
'stylesheet' => [
{'crossorigin' => 'anonymous', 'href' => 'https://resources.whatwg.org/spec.css'},
{'crossorigin' => '', 'href' => 'https://resources.whatwg.org/standard.css'},
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HTML/Mason/FakeApache.pm view on Meta::CPAN
#
# Try to get as much info as possible from CGI.pm, which has
# workarounds for things like the IIS PATH_INFO bug.
#
$self->{headers_in} ||= HTML::Mason::FakeTable->new
( 'Authorization' => $self->{query}->auth_type, # No credentials though.
'Content-Length' => $ENV{CONTENT_LENGTH},
'Content-Type' =>
( $self->{query}->can('content_type') ?
$self->{query}->content_type :
$ENV{CONTENT_TYPE}
view all matches for this distribution
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