view release on metacpan or search on metacpan
lib/Flickr/Upload/FireEagle.pm view on Meta::CPAN
Aaron Straup Cope <ascope@cpan.org>
=head1 NOTES
Aside from requiring your own Flickr API key, secret and authentication token
you will also need similar FireEagle (OAuth) credentials. Since Flickr::Upload::FireEagle
already requires that you install the excellent I<Net::FireEagle> you should just
use the command line I<fireeagle> client for authorizing yourself with FireEagle.
=head1 SEE ALSO
view all matches for this distribution
view release on metacpan or search on metacpan
flickr_upload view on Meta::CPAN
else {
die "Unable to initiate OAuth authorization. Response from Flickr was: '$response'\n";
}
my $ac_rc = $ua->oauth_access_token(\%request_token);
if($ac_rc eq 'ok') {
print "Saving OAuth credentials to $oauth_config\n";
$ua->export_storable_config($oauth_config);
}
}
if(!exists $args{'auth_token'} && -r $oauth_config) {
$ua = Flickr::Upload->import_storable_config($oauth_config);
bless $ua, 'Flickr::Upload';
}
die "No auth token or OAuth credentials found.\nUse --auth or --oauth to generate credentials or --auth_token to specify a token.\n"
unless exists $args{'auth_token'} || $ua->is_oauth;
if( $check ) {
exit( checkToken( $ua, $args{api_key}, $args{auth_token} ) );
}
flickr_upload view on Meta::CPAN
Authentication token. You B<must> get an authentication token using
C<--auth> before you can upload images. See the L<EXAMPLES> section.
=item --oauth
Interactively perform OAuth authorization with Flickr. The user will get a URL to visit at Flickr at which Flickr::Upload must be granted write permissions. After granting permission, the user will be redirected to a dummy URL that contains an OAuth ...
=item --title <title>
Title to use on all the images. Optional.
flickr_upload view on Meta::CPAN
Note that options unknown to Flickr will result in undefined behaviour.
=item --check
Checks the authentication token via the flickr.auth.checkToken API call.
This can be used to verify API keys and credentials without trying to
upload an image. The output is the raw results of the API call.
=item --progress, --no-progress
Display a progress bar for each upload with L<Term::ProgressBar>. That
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Footprintless/Plugin/Ldap/Ldap.pm view on Meta::CPAN
my ( $self, $dn, %options ) = @_;
croak('not connected') unless ( $self->{connection} );
if ( !$dn ) {
# binding with instance credentials
$dn = $self->{bind_dn};
%options = %{ $self->{bind_options} };
}
if ($dn) {
view all matches for this distribution
view release on metacpan or search on metacpan
t/Footprintless.t view on Meta::CPAN
my ($fpl);
ok( $fpl = Footprintless->new(
config_dirs => File::Spec->catdir( $test_dir, 'config/entities' ),
config_properties_file => File::Spec->catfile( $test_dir, 'config/credentials.pl' )
),
'load data/entities'
);
ok( $fpl->entities()->{dev}, 'root is dev' );
view all matches for this distribution
view release on metacpan or search on metacpan
t/24e-kill.t does not terminate
_X_ have a "remote_host" option to go with "cmd" option
_X_ remote_host => host
_X_ remote_host => [host, user, pwd]
to run on a remote server that requires some credentials
_X_ remote_host => [ \@hosts ] or [ \@hosts, user, pwd ]
to run on any of a cluster of available remote hosts
_X_ allow a separate MAX_PROC-like setting to be used for
remote hosts
___ remote_host_proto => 'ssh'
view all matches for this distribution
view release on metacpan or search on metacpan
lib/LWP/UserAgent/FramesReady.pm view on Meta::CPAN
Get/set the B<$self->{'nomax'}> can be used by the included callback
routine to enforce truncation of received content even if the request
to do so is not honored by the server called for the content.
=item $ua->credent([$credentials])
Get/set the credentials for authentification if called for.
=item $ua->errors()
Get the last error encountered if a return was an undef. This routine
has only been tested in development so there is no guarantee that it
lib/LWP/UserAgent/FramesReady.pm view on Meta::CPAN
}
return 1;
}
=item $ua->get_basic_credentials()
This routine overloads the LWP::UserAgent::get_basic_credentials in
order to supply authorization if it has been pre-loaded an initial/new
or by use of the $ua->credent() routine. Supplies a return in a list
context of a UserID and a Password to LWP::UserAgent::credentials().
=cut
sub get_basic_credentials {
my($self, $realm, $uri) = @_;
$self->{'errstring'} = '';
if ($self->{credent}) {
return split(':', $self->{credent}, 2);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/FreeMED/Relay.pm view on Meta::CPAN
$JSON::QuotApos = 1;
$JSON::BareKey = 1;
return $self;
}
sub set_credentials {
my $self = shift;
my ( $base_uri, $username, $password ) = @_;
print "base_uri = $base_uri\n" if $self->{'debug'};
print "username = $username\n" if $self->{'debug'};
lib/FreeMED/Relay.pm view on Meta::CPAN
}
sub login {
my $self = shift;
if (!defined($self->{username}) or !defined($self->{password})) {
die "login(): Must set credentials before logging in\n";
}
$self->_init() if (!defined($self->{ua}));
my $login = $self->call(
'org.freemedsoftware.public.Login.Validate',
lib/FreeMED/Relay.pm view on Meta::CPAN
Returns a FreeMED::Relay object.
C<new> takes "debug" as a boolean argument.
=item set_credentials ( $base_uri, $username, $password )
Sets the credentials used to access the FreeMED installation in question. The
C<$base_uri> variable should be the base name of the installation, such as
"http://localhost/freemed".
=item login ( )
view all matches for this distribution
view release on metacpan or search on metacpan
t/100_low/32_proxy_auth.t view on Meta::CPAN
my ( $self, $headers, $request ) = @_;
my $auth = $self->proxy->hop_headers->header('Proxy-Authorization') || '';
my $request_uri = $request->uri->as_string;
my $token = $request_uri =~ m{/escape$} ? $token_escape : $token_simple;
# check the credentials
if ( $auth ne $token ) {
my $response = HTTP::Response->new(407);
$response->header( Proxy_Authenticate => 'Basic realm=
+"HTTP::Proxy"' );
$self->proxy->response($response);
view all matches for this distribution
view release on metacpan or search on metacpan
t/000_env.t view on Meta::CPAN
## test for presence of our test_environment_variables
if( $ENV{PERLSSH_HOST} ){
if( $ENV{PERLSSH_USER} ){
pass("PERLSSH host values seem to be sound." );
}else{
fail("do we have ssh credentials via ENV variables? (HOST is required! You can pass ENV vars like this: make test PERLSSH_HOST=example.com PERLSSH_PORT=port PERLSSH_USER=user)" );
BAIL_OUT('Required ENV VARS declared!');
}
}else{
ok(1);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/FusionInventory/Agent/HTTP/Client.pm view on Meta::CPAN
# authentication required
if ($result->code() == 401) {
if ($self->{user} && $self->{password}) {
$logger->debug(
$log_prefix .
"authentication required, submitting credentials"
);
# compute authentication parameters
my $header = $result->header('www-authenticate');
my ($realm) = $header =~ /^Basic realm="(.*)"/;
my $host = $url->host();
my $port = $url->port() ||
($scheme eq 'https' ? 443 : 80);
$self->{ua}->credentials(
"$host:$port",
$realm,
$self->{user},
$self->{password}
);
lib/FusionInventory/Agent/HTTP/Client.pm view on Meta::CPAN
alarm 0;
};
if (!$result->is_success()) {
$logger->error(
$log_prefix .
"authentication required, wrong credentials"
);
}
} else {
# abort
$logger->error(
$log_prefix .
"authentication required, no credentials available"
);
}
} elsif ($result->code() == 407) {
$logger->error(
$log_prefix .
"proxy authentication required, wrong or no proxy credentials"
);
} else {
# check we request through a proxy
my $proxyreq = defined $result->request->{proxy};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/FusqlFS/Backend/Base.pm view on Meta::CPAN
These methods can be used to control database connection in runtime.
Please use them instead of direct DBH object access via $fusqlh->{dbh},
as they make some more work, than simple database {dis,re}connection.
They use credentials, provided on first backend object initialization
with L</new> method above, so no parameters are required.
C<connect> establish new database connection and reinitializes backend.
Backend reinitialization is required, because some backends make some
query preparation, linked to current database connection.
view all matches for this distribution
view release on metacpan or search on metacpan
bin/gbrowse_aws_balancer.pl view on Meta::CPAN
=head1 CONFIGURING AWS CREDENTIALS
To work, the balancer script must be able to make spot instance
requests and to monitor and terminate instances. To perform these
operations the script must have access to the appropriate AWS
credentials (access key and secret key) on the command line or as
environment variables.
While the script does its best to shield the credentials from prying
eyes, there is still a chance that the credentials can be intercepted
by another party with login access to the machine that the master runs
on and use the credentials to run up your AWS bill. For this reason
some people will prefer to create an EC2 account or role with limited
access to AWS resources.
=over 4
=item 1. Your personal EC2 credentials
You may provide the balancer script with --access_key and --secret_key
command line arguments using your personal EC2 credentials or set the
environment variables EC2_ACCESS_KEY and EC2_SECRET_KEY. If not
provided, the script will interactively prompt for one or both of
these values.
This is the simplest method, but has the risk that if the credentials
are intercepted by a malicious third party, he or she gains access to
all your EC2 resources.
=item 2. The credentials of a restricted IAM account
You may use the Amazon AWS console to create an IAM (Identity Access
and Management) user with restricted permissions, and provide that
user's credentials to the script on the command line or with
environment variables. The following IAM permission policy is the
minimum needed for the balancer script to work properly:
{
"Statement": [
bin/gbrowse_aws_balancer.pl view on Meta::CPAN
}
]
}
Note that even with these restrictions, an unauthorized user with
access to the credentials could still launch a large number of spot
instances or terminate bona fide instances. This is just a fundamental
limitation of the granularity of EC2's permissions system.
=item 3. Create an IAM role
If the master is running on an EC2 instance, then the most convenient
way to pass credentials is by assigning the instance an IAM role. The
balancer script can then obtain temporary credentials by making
internal EC2 calls. The credentials do not need to be provided on the
command line or in environment variables, and are only valid for short
periods of time, limiting the effect of theft.
First, create an IAM role using the Amazon Console. Select
IAM->Roles->Create New Role, and give the role the name
view all matches for this distribution
view release on metacpan or search on metacpan
examples/oauth/generate_offline_credentials.pl view on Meta::CPAN
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# This utility script demonstrate how to generate offline credentials for
# OAuth2 Installed Applications. The generated refresh token can then be used
# to configure the client library, refer to the OAuth2 section of the
# adwords.properties file. This example is meant to be run from the command line
# and requires user input.
#
examples/oauth/generate_offline_credentials.pl view on Meta::CPAN
use Google::Ads::AdWords::Client;
use Cwd qw(abs_path);
# Main subroutine.
sub generate_offline_credentials {
my ($client) = @_;
my $auth_handler = $client->get_oauth_2_handler();
print "Please enter your OAuth 2.0 Client ID and Client Secret.\n" .
examples/oauth/generate_offline_credentials.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 AdWords Client, credentials will be read from ~/adwords.properties.
my $client = Google::Ads::AdWords::Client->new();
# Call the example
generate_offline_credentials($client);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/GRNOC/Config.pm view on Meta::CPAN
When asking for attributes denoted by '@' it will return only the attribute(s) without the hash
use GRNOC::Config;
my $foo = GRNOC::Config->new(config_file => '/etc/grnoc/db.xml', debug => 0, force_array => 0 schema => '/path/to/schema.csd')
my $db_username = $foo->get("/config/db/credentials");
print $db_username->{'user'};
print $db_username->{'password'};
#just 1 attribute
my $user = $foo->get("/config/db/credentials[1]/@user");
my $password = $foo->get("/config/db/credentials[1]/@password");
#if I have more than 1 result I get an array
my $hosts = $foo->get("/config/hosts") or die Dumper($foo->get_error());
foreach my $host ($hosts){
print $host->{'hostname'};
lib/GRNOC/Config.pm view on Meta::CPAN
##get errors
print Dumper($foo->get_errors());
# I always want an array... even if I only get 1 result
$foo->{'force_array'} = 1;
$db_username = $foo->get("/config/db/credentials") or die Dumper($foo->get_error());
print @{db_username}[0]->{'user'}
print @{db_username}[0]->{'password'}
$user = $foo->get("/config/db/credentials[1]/@user") or die Dumper($foo->get_error());
$password = $foo->get("/config/db/credentials[1]/@password") or die Dumper($foo->get_error());
$user = @{$user}[0];
$password = @{$password}[0];
my $valid = $foo->validate();
view all matches for this distribution
view release on metacpan or search on metacpan
bin/wsutil.pl view on Meta::CPAN
cookies in the file when authenticating to a service and
also save them to this file when done. If not given
cookies are maintained only for the current run.
It is probably prudent to make sure that the cookies that
are generated using your own credentials are cleaned up
afterwards or at least not made publicly available.
-c service cache file (in case of specifying -S Service Name)
--servicecache This file should be in the same format as the grnoc proxy
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Game/WordBrain/WordList.pm view on Meta::CPAN
credensiveness
credent
credential
credentialed
credentialism
credentials
credently
credenza
credenzas
credere
credibilities
view all matches for this distribution
view release on metacpan or search on metacpan
return substr($buf,0,$newlen);
}
=head2 joingame
Sends username/password credentials and joins the game. Returns 0 if
the username/password was not accepted.
=cut
sub joingame {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Games/Word/Wordlist/Enable.pm view on Meta::CPAN
creation creationism creationisms creationist creationists creations creative
creatively creativeness creativenesses creativities creativity creator
creators creatural creature creaturehood creaturehoods creatureliness
creaturelinesses creaturely creatures creche creches credal credence credences
credenda credendum credent credential credentialed credentialing credentialism
credentialisms credentialled credentialling credentials credenza credenzas
credibilities credibility credible credibly credit creditabilities
creditability creditable creditableness creditablenesses creditably credited
crediting creditor creditors credits creditworthiness creditworthinesses
creditworthy credo credos credulities credulity credulous credulously
credulousness credulousnesses creed creedal creeds creek creeks creel creeled
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Gantry/Docs/Cookbook.pod view on Meta::CPAN
tables into an existing database is better for self standing sites.
The samples use a single database, so I'll show that approach first.
There are three essential columns in the user table needed for
authentication: id, user name, and pass word. The id is for the benifit
of the ORM. The other fields hold the user's credentials. The names
of these columns is not fixed by the AuthCookie plugin. The defaults
are ident and password. We'll see how to control the names the plugin
uses below.
You are welcome to put additional information in the user rows. The
view all matches for this distribution
view release on metacpan or search on metacpan
eg/assign-keywords.pl view on Meta::CPAN
use Data::Dumper;
use v5.14;
my $c = Gcis::Client->new;
$c->url($ARGV[0]) if $ARGV[0];
$c->find_credentials->login;
my $findings = $c->get('/report/nca3draft/finding');
for my $f (@$findings) {
my $finding_identifer = $f->{identifier};
say $finding_identifer;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Geo/Coder/GooglePlaces/V3.pm view on Meta::CPAN
and I<MIME::Base64> modules. To test your client, set the environment
variables GMAP_CLIENT and GMAP_KEY before running v3_live.t
GMAP_CLIENT=your_id GMAP_KEY='your_key' make test
You can get a key from L<https://console.developers.google.com/apis/credentials>.
=cut
sub new {
my($class, %args) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Geo/Coder/Ovi.pm view on Meta::CPAN
=item * I<appid>
=item * I<token>
Authentication credentials. (optional, for now)
Credentials can be obtained here: L<https://api.developer.nokia.com/ovi-api>
Note: performance and/or access may be limited without credentials.
=item * I<compress>
Enable compression. (default: 1, unless I<debug> is enabled)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Geo/Google/StaticMaps/V2.pm view on Meta::CPAN
=head1 Google Enterprise Credentials
These settings are simply passed through to L<URL::Signature::Google::Maps::API>.
I recommend storing the credentials in the INI formatted file and leaving these values as undef.
=head2 client
Sets and returns the Google Enterprise Client
view all matches for this distribution
view release on metacpan or search on metacpan
bin/ip-geo-base-ru view on Meta::CPAN
=item * -h, --help - show help and exit
=item * -d, --dsn - the only mandatory option - data base connection
string. Syntax described in L</DBI>, example 'dbi:mysql:mydb'.
=item * -u, --user, -p, --password - credentials that should be
used to connect to the DB. Default values are empty.
=item * -t, --table - name of the table in the database where data
should be stored, default value is 'ip_geo_base_ru'.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Geo/OGC/Service/WFS.pm view on Meta::CPAN
for my $name (sort keys %types) {
my $type = $types{$name};
# to do: geometry and primary key
my ($pseudo_credentials) = pseudo_credentials($type);
my @elements;
for my $property (keys %{$type->{columns}}) {
next if $pseudo_credentials->{$property};
my $minOccurs = 0;
push @elements, ['element', {
name => $type->{columns}{$property}{out_name},
type => $type->{columns}{$property}{out_type},
lib/Geo/OGC/Service/WFS.pm view on Meta::CPAN
}
}
my $filter = filter2sql($query->{filter}, $type) // '';
# pseudo_credentials: these fields are required to be in the filter and they are not included as attributes
my ($pseudo_credentials, @pseudo_credentials) = pseudo_credentials($type);
if (@pseudo_credentials) {
# test for pseudo credentials in filter
my $pat1 = "\\(\\(\"$pseudo_credentials[0]\" = '.+?'\\) AND \\(\"$pseudo_credentials[1]\" = '.+?'\\)\\)";
my $pat2 = "\\(\\(\"$pseudo_credentials[1]\" = '.+?'\\) AND \\(\"$pseudo_credentials[0]\" = '.+?'\\)\\)";
my $n = join(' and ', @pseudo_credentials);
unless ($filter and ($filter =~ /$pat1/ or $filter =~ /$pat2/)) {
$self->error({ exceptionCode => 'InvalidParameterValue',
locator => 'filter',
ExceptionText => "Not authorized. Please provide '$n' in filter." });
return;
lib/Geo/OGC/Service/WFS.pm view on Meta::CPAN
}
my @columns = ("$type->{'gml:id'} as gml_id");
# reverse the field names
for my $column (keys %{$type->{columns}}) {
next if $pseudo_credentials->{$column};
my $name = $type->{columns}{$column}{out_name};
next if $query->{properties} && not $query->{properties}{$name};
$filter =~ s/$name/$column/g if $filter;
push @columns, "\"$column\" as \"$name\"";
lib/Geo/OGC/Service/WFS.pm view on Meta::CPAN
GeometryColumn => '"'.$geom.'"',
columns => \%columns,
'gml:id' => $pk[0],
Operations => $type->{Operations}, # $self->{config}{Operations} is the default
require_user => $type->{require_user} // $self->{config}{require_user}, # operation dependent?
pseudo_credentials => $type->{pseudo_credentials},
# to do: these in ows:WGS84BoundingBox, GetCapabilities
#LowerCorner
#UpperCorner
};
for my $o (@GDAL_GML_Creation_options) {
$feature_type->{$o} = $type->{$o} if exists $type->{$o};
}
my ($h, @c) = pseudo_credentials($feature_type);
my $ok = 1;
for my $c (@c) {
unless ($feature_type->{columns}{$c}) {
carp "pseudo credential column '$c' not in table.\n";
$ok = 0;
lib/Geo/OGC/Service/WFS.pm view on Meta::CPAN
push @element, [$tag, $t];
}
return @element;
}
sub pseudo_credentials {
my $type = shift;
my $c = $type->{pseudo_credentials};
return ({}) unless $c;
my($c1,$c2) = $c =~ /(\w+),(\w+)/;
return ({$c1 => 1,$c2 => 1},$c1,$c2);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Gerrit/Client.pm view on Meta::CPAN
=item B<< http_digest_auth($username, $password) >>
Returns a callback to be used with REST-related Gerrit::Client functions.
The callback enables Digest-based HTTP authentication with the given
credentials.
Note that only the Digest scheme used by Gerrit (as of 2.8) is supported:
algorithm = MD5, qop = auth.
=cut
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Gerrit/REST.pm view on Meta::CPAN
$URL = URI->new($URL) if is_string($URL);
is_instance($URL, 'URI')
or croak __PACKAGE__ . "::new: URL argument must be a string or a URI object.\n";
# If no password is set we try to lookup the credentials in the .netrc file
if (! defined $password) {
eval {require Net::Netrc}
or croak "Can't require Net::Netrc module. Please, specify the USERNAME and PASSWORD.\n";
if (my $machine = Net::Netrc->lookup($URL->host, $username)) { # $username may be undef
$username = $machine->login;
$password = $machine->password;
} else {
croak "No credentials found in the .netrc file.\n";
}
}
is_string($username)
or croak __PACKAGE__ . "::new: USERNAME argument must be a string.\n";
lib/Gerrit/REST.pm view on Meta::CPAN
$rest->addHeader('Accept' => 'application/json');
# Configure UserAgent name and password authentication
for my $ua ($rest->getUseragent) {
$ua->agent(__PACKAGE__);
$ua->credentials($URL->host_port, 'Gerrit Code Review', $username, $password);
}
return bless {
rest => $rest,
json => JSON->new->utf8->allow_nonref,
lib/Gerrit/REST.pm view on Meta::CPAN
=item * USERNAME
The username of a Gerrit user.
It can be undefined if PASSWORD is also undefined. In such a case the
user credentials are looked up in the C<.netrc> file.
=item * PASSWORD
The HTTP password of the user. (This is the password the user uses to
log in to Gerrit's web interface.)
It can be undefined, in which case the user credentials are looked up
in the C<.netrc> file.
=item * REST_CLIENT_CONFIG
A Gerrit::REST object uses a REST::Client object to make the REST
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Getopt/Tree.pm view on Meta::CPAN
{
name => 'no-cache',
abbr => 'nc',
exists => 1,
optional => 1,
descr => 'Don\'t cache your credentials in /tmp/.'
},
# Start of a branch. If one or more branches exist, at least one must be
# followed.
{
name => 'search',
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Git/Code/Review/Command/config.pm view on Meta::CPAN
';',
';[global]',
'; server = imap.mailserver.com',
'; port = 993',
'; ssl = 1',
'; credentials-file = /etc/code-review/sox_code_review_email.conf',
'; folder = INBOX',
'; auto-approve = 1',
],
'notification.config' => [
"; Notification Configuration for audit",
view all matches for this distribution
view release on metacpan or search on metacpan
=item credential( CREDENTIAL_HASHREF [, OPERATION ] )
=item credential( CREDENTIAL_HASHREF, CODE )
Executes C<git credential> for a given set of credentials and specified
operation. In both forms C<CREDENTIAL_HASHREF> needs to be a reference to
a hash which stores credentials. Under certain conditions the hash can
change.
In the first form, C<OPERATION> can be C<'fill'>, C<'approve'> or C<'reject'>,
and function will execute corresponding C<git credential> sub-command. If
it's omitted C<'fill'> is assumed. In case of C<'fill'> the values stored in
view all matches for this distribution