view release on metacpan or search on metacpan
lib/Business/OnlinePayment/PayPal.pm view on Meta::CPAN
sub transactionid { shift()->authorization(@_); }
sub order_number { shift()->correlationid(@_); }
=head2 get_credentials()
Get the credential information for Business::PayPal::API that was
provided to Business::OnlinePayment::new(). The supported arguments
are:
lib/Business/OnlinePayment/PayPal.pm view on Meta::CPAN
if behavior like this is needed in this module so I will wait for user
feedback to determine if we need/want to implement this.
=cut
sub get_credentials {
my $self = shift;
my %credentials;
my @cred_vars = (
[qw(PKCS12File PKCS12Password)],
[qw(CertFile KeyFile)], [qw(Signature)],
);
lib/Business/OnlinePayment/PayPal.pm view on Meta::CPAN
foreach my $var (@vars) {
# HACK: Business::OnlinePayment makes method lower case
my $method = lc($var);
if ( $self->can($method) ) {
$credentials{$var} = $self->$method;
}
else {
$need++;
}
}
if ($need) {
undef %credentials;
}
else {
last;
}
}
return %credentials;
}
=head2 get_request_data()
Return a hash %data with all the data from content() that we will try
lib/Business/OnlinePayment/PayPal.pm view on Meta::CPAN
=over 4
=item *
Get credentials to be used for authentication with PayPal by calling
L</get_credentials()>.
=item *
Get request data to be passed to PayPal by calling
L</get_request_data()>.
lib/Business/OnlinePayment/PayPal.pm view on Meta::CPAN
=cut
sub submit {
my $self = shift;
my %credentials = $self->get_credentials;
my %request = $self->get_request_data;
my $pp =
Business::PayPal::API->new( %credentials,
sandbox => $self->test_transaction, );
my %resp = $pp->DoDirectPaymentRequest(%request);
$self->server_response( \%resp );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Business/OnlinePayment/Vindicia/Select.pm view on Meta::CPAN
"Vindicia::Select",
default_Origin => 'NEW', # or RECURRING
);
push @{$client->{'mocked'}}, {
action => 'billTransactions', # must match the action you call, or the script will die
login => 'mocked', # must match the login credentials used, or the script will die
resp => 'ok_duplicate', # or you can return a HASH of the actual data you want to mock
};
=head1 FUNCTIONS
view all matches for this distribution
view release on metacpan or search on metacpan
eg/lib/Example/Role/Auth.pm view on Meta::CPAN
use MooX::Options;
use Business::PayPal::API qw( GetTransactionDetails TransactionSearch );
use Types::Standard qw( InstanceOf );
# credentials
option password => (
is => 'ro',
format => 's',
required => 1,
doc => 'password',
view all matches for this distribution
view release on metacpan or search on metacpan
t/Business-PayPal-NVP.t view on Meta::CPAN
diag '###################################################################';
}
}
if ( ! %auth ) {
# put in fake credentials for at least bare minimum tests
$auth{'user'} = 'your.TEST.api.username.for.paypal.tld';
$auth{'pwd'} = 'your.TEST.api.password';
$auth{'sig'} = 'your.TEST.api.signature';
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Business/PayPal/Permissions.pm view on Meta::CPAN
=item * password
=item * signature
credentials from paypal.com
=item * app_id
app id from x.com, use 'APP-80W284485P519543T' for sandbox
view all matches for this distribution
view release on metacpan or search on metacpan
examples/test.pl view on Meta::CPAN
use lib "$Bin/../lib";
use Business::PayPoint;
use Data::Dumper;
my $bp = Business::PayPoint->new();
$bp->set_credentials( 'secpay', 'secpay', 'secpay' );
my %result = $bp->validateCardFull(
'trans_id' => 'tran0001',
'ip' => '127.0.0.1',
'name' => 'Mr Cardholder',
view all matches for this distribution
view release on metacpan or search on metacpan
t/210-USPS_Online-basic.t view on Meta::CPAN
use Scalar::Util qw(blessed);
plan skip_all => 'Required modules not installed'
unless Business::Shipping::Config::calc_req_mod('USPS_Online');
plan skip_all => 'No credentials'
unless $ENV{USPS_USER_ID} and $ENV{USPS_PASSWORD};
plan skip_all => 'Slow tests. Set TEST_SLOW to run.'
unless $ENV{TEST_SLOW};
view all matches for this distribution
view release on metacpan or search on metacpan
share/tnt-expressconnect/xsd/pricing/v3/PriceResponseOUT.xsd view on Meta::CPAN
</xs:complexType>
<xs:complexType name="brokenRule">
<xs:annotation>
<xs:documentation>The brokenRule section is for application errors which the customer can resolve such as invalid
postcode, login credentials.
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="rateId" type="xs:string">
<xs:annotation>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Business/TrueLayer/Authenticator.pm view on Meta::CPAN
}
my $url = "https://" . $self->host . "/connect/token";
my $json = JSON->new->utf8->canonical->encode(
{
grant_type => 'client_credentials',
client_id => $self->client_id,
client_secret => $self->client_secret,
scope => join( " ",$self->scope->@* ),
}
);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Business/UPS/Tracking.pm view on Meta::CPAN
UPS account password
=head2 config
Optionally you can retrieve all or some UPS webservice credentials from a
configuration file. This accessor holds the path to this file.
Defaults to C<~/.ups_tracking>
Example configuration file:
view all matches for this distribution
view release on metacpan or search on metacpan
* Removed two tests that started failing due to changes in the API
response.
* Skip tracking tests (which are disabled anyway) rather than failing if
test credentials aren't set.
* Access to the testing/staging environment is no longer granted by
default and testing against the production environment is allowed
(load/stress testing isn't), so tests are now run against the
production API by default. To run against the testing/staging
environment, set USPS_WEBTOOLS_ENVIRONMENT to TESTING while setting up
your credentials.
1.124 2020-09-18
* New maintainer
1.122 2016-10-13T00:13:29Z
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Business/cXML.pm view on Meta::CPAN
}
=item C<B<sender_callback>( I<$sub> )>
By default, a request's From/Sender credentials are only used to guess
response credentials. If you specify a callback here, it will be invoked
immediately after XML parsing, before passing to transaction handlers, giving
you an opportunity to authenticate the caller.
Your subroutine will be passed 3 arguments:
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Business/eWAY/RapidAPI.pm view on Meta::CPAN
else {
$content_type = "application/json";
}
my $ua = $self->ua;
$ua->credentials( $self->username, $self->password );
my $resp;
if ($is_post) {
$resp = $ua->post(
$url,
Content => $request,
view all matches for this distribution
view release on metacpan or search on metacpan
t/samples/slashdot.rss view on Meta::CPAN
<slash:section>hardware</slash:section>
<slash:hit_parade>6,6,4,2,0,0,0</slash:hit_parade>
<feedburner:origLink>http://slashdot.feedsportal.com/c/35028/f/647410/s/3c35f940/sc/38/l/0Lhardware0Bslashdot0Borg0Cstory0C140C0A70C0A60C0A0A392340Cby0E20A450Ethe0Etop0Especies0Ewill0Eno0Elonger0Ebe0Ehumans0Eand0Ethat0Ecould0Ebe0Ea0Eproblem0Dut...
</item>
<item><title>Two Earth-Like Exoplanets Don't Actually Exist</title><link>http://rss.slashdot.org/~r/Slashdot/slashdot/~3/NcsdVQtQOQQ/story01.htm</link><description>Two suspected exoplanets, Gliese 581g and 581d, have been shown to not exist, and ...
view all matches for this distribution
view release on metacpan or search on metacpan
docs/database.html view on Meta::CPAN
my @events = $schema->resultset('Event')->search( { hostname => 'foo' } );
</pre>
<p>More typically you will not want to specify the user
credentials in the script itself so the better approach is to use
a configuration file. That can be done like this:</p>
<pre>
use BuzzSaw::DB;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Buzznet/API.pm view on Meta::CPAN
sub getXMLRPC
{
my $self = shift;
my $cli = RPC::XML::Client->new($self->url);
$cli->credentials("Buzznet",$self->{"username"},$self->{"password"});
my $request = $cli->request;
return $cli;
}
sub sendRequest
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CAM/App.pm view on Meta::CPAN
=item authenticate
Test the login information, if any. Currently no tests are performed
-- this is a no-op. Subclasses may override this method to test login
credentials. Even though it's currently trivial, subclass methods
should alway include the line:
return undef if (!$self->SUPER::authenticate());
In case the parent authenticate() method adds a test in the future.
view all matches for this distribution
view release on metacpan or search on metacpan
my $protocol = lc($1);
my $host = $2;
my $path = $3;
# Strip off user and password, if any
my $credentials;
if ($host =~ /^(.*)\@([^\@]*)$/) {
$credentials = $1;
$host = lc($2);
} else {
$host = lc($host);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CGI/Application/Plugin/Authentication/Driver/CDBI.pm view on Meta::CPAN
FIELD_METHODS supports filters as specified by
CGI::Application::Plugin::Authentication::Driver
=head1 METHODS
=head2 verify_credentials
This method will test the provided credentials against the values found in
the database, according to the Driver configuration.
=cut
sub verify_credentials {
my $self = shift;
my @creds = @_;
my @_options=$self->options;
die "The Class::DBI driver requires a hash of options" if @_options % 2;
lib/CGI/Application/Plugin/Authentication/Driver/CDBI.pm view on Meta::CPAN
my $cdbiclass=$options{CLASS};
die "CLASS option must be set." unless($cdbiclass);
return unless(scalar(@creds) eq scalar(@{$options{FIELD_METHODS}}));
my @crednames=@{$self->authen->credentials};
my %search;
my %compare;
my $i=0;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CGI/Application/Plugin/Authentication/Driver/DBIC.pm view on Meta::CPAN
=back
=head1 METHODS
=head2 verify_credentials
This method will test the provided credentials against the values found in
the database, according to the Driver configuration.
=cut
sub verify_credentials {
my $self = shift;
my @creds = @_;
my @_options = $self->options;
die "The Class::DBIx driver requires a hash of options" if @_options % 2;
lib/CGI/Application/Plugin/Authentication/Driver/DBIC.pm view on Meta::CPAN
my $class = $options{CLASS};
die "CLASS option must be set." unless($class);
return unless(scalar(@creds) eq scalar(@{$options{FIELD_METHODS}}));
my @crednames=@{$self->authen->credentials};
my %search;
my %compare;
my $i=0;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CGI/Application/Plugin/Authentication.pm view on Meta::CPAN
the CGI::Application::Plugin::Authentication plugin.
There are two main decisions that you need to make when using this module. How will
the usernames and password be verified (i.e. from a database, LDAP, etc...), and how
can we keep the knowledge that a user has already logged in persistent, so that they
will not have to enter their credentials again on the next request (i.e. how do we 'Store'
the authentication information across requests).
=head2 Choosing a Driver
There are three drivers that are included with the distribution. Also, there
lib/CGI/Application/Plugin/Authentication.pm view on Meta::CPAN
Authen::Simple for more information). This should be enough to cover
everyone's needs.
If you need to authenticate against a source that is not provided, you can use
the Generic driver which will accept either a hash of username/password pairs,
or an array of arrays of credentials, or a subroutine reference that can verify
the credentials. So through the Generic driver you should be able to write
your own verification system. There is also a Dummy driver, which blindly
accepts any credentials (useful for testing). See the
L<CGI::Application::Plugin::Authentication::Driver::Generic>,
L<CGI::Application::Plugin::Authentication::Driver::DBI> and,
L<CGI::Application::Plugin::Authentication::Driver::Dummy> docs for more
information on how to use these drivers. And see the L<Authen::Simple> suite
of modules for information on those drivers.
lib/CGI/Application/Plugin/Authentication.pm view on Meta::CPAN
This Authentication plugin can handle ticket based authentication systems as well. All that
is required of you is to write a Store module that can understand the contents of the ticket.
The Authentication plugin will require at least the 'username' to be retrieved from the
ticket. A Ticket based authentication scheme will not need a Driver module at all, since the
actual verification of credentials is done by an external authentication system, possibly
even on a different host. You will need to specify the location of the login page using
the LOGIN_URL configuration variable, and unauthenticated users will automatically
be redirected to your ticket authentication login page.
lib/CGI/Application/Plugin/Authentication.pm view on Meta::CPAN
Here you can choose which authentication module(s) you want to use to perform the authentication.
For simplicity, you can leave off the CGI::Application::Plugin::Authentication::Driver:: part
when specifying the DRIVER name If this module requires extra parameters, you
can pass an array reference that contains as the first parameter the name of the module,
and the rest of the values in the array will be considered options for the driver. You can provide
multiple drivers which will be used, in order, to check the credentials until
a valid response is received.
DRIVER => 'Dummy' # let anyone in regardless of the password
- or -
lib/CGI/Application/Plugin/Authentication.pm view on Meta::CPAN
# Check for CREDENTIALS
if ( defined $props->{CREDENTIALS} ) {
croak "authen config error: parameter CREDENTIALS is not a string or arrayref"
if ref $props->{CREDENTIALS} && Scalar::Util::reftype( $props->{CREDENTIALS} ) ne 'ARRAY';
$config->{CREDENTIALS} = delete $props->{CREDENTIALS};
# We will accept a string, but what we really want is an arrayref of the credentials
no warnings qw(uninitialized);
$config->{CREDENTIALS} = [ $config->{CREDENTIALS} ] if Scalar::Util::reftype( $config->{CREDENTIALS} ) ne 'ARRAY';
}
# Check for LOGIN_SESSION_TIMEOUT
lib/CGI/Application/Plugin/Authentication.pm view on Meta::CPAN
$self->initialize;
return $self->{is_new_login};
}
=head2 credentials
This method will return the names of the form parameters that will be
looked for during a login. By default they are authen_username and authen_password,
but these values can be changed by supplying the CREDENTIALS parameters in the
configuration. Calling this function, will not itself generate cookies or session ids.
=cut
sub credentials {
my $self = shift;
my $config = $self->_config;
return $config->{CREDENTIALS} || [qw(authen_username authen_password)];
}
lib/CGI/Application/Plugin/Authentication.pm view on Meta::CPAN
}
=head2 drivers
This method will return a list of driver objects that are used for
verifying the login credentials. Calling this function, will not itself generate cookies or session ids.
=cut
sub drivers {
my $self = shift;
lib/CGI/Application/Plugin/Authentication.pm view on Meta::CPAN
# We do this before checking to see if the user is already logged in, since
# a logged in user may want to log in as a different user.
my $field_names = $config->{CREDENTIALS} || [qw(authen_username authen_password)];
my $query = $self->_cgiapp->query;
my @credentials = map { scalar $query->param($_) } @$field_names;
if ($credentials[0]) {
# The user is trying to login
# make sure if they are already logged in, that we log them out first
my $store = $self->store;
$store->clear if $store->fetch('username');
foreach my $driver ($self->drivers) {
if (my $username = $driver->verify_credentials(@credentials)) {
# This user provided the correct credentials
# so save this new login in the store
my $now = time();
$store->save( username => $username, login_attempts => 0, last_login => $now, last_access => $now );
$self->{is_new_login} = 1;
# See if we are remembering the username for this user
lib/CGI/Application/Plugin/Authentication.pm view on Meta::CPAN
sub authen_login_runmode {
my $self = shift;
my $authen = $self->authen;
my $credentials = $authen->credentials;
my $username = $credentials->[0];
my $password = $credentials->[1];
my $html;
if ( my $sub = $authen->_config->{RENDER_LOGIN} ) {
$html = $sub->($self);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CGI/Authen/Simple.pm view on Meta::CPAN
my $auth = CGI::Authen::Simple->new();
$auth->logged_in() || $auth->auth();
# do stuff here
# if you need it, you can access the user's credentials like so:
my $username = $auth->{'profile'}->{'username'};
# assume your account table had other attributes, like full_name char(64)
my $fullname = $auth->{'profile'}->{'full_name'};
view all matches for this distribution
view release on metacpan or search on metacpan
=head2 REMINDER
CGI::Authent doesn't validate the passwords. It cannot even see them. It
just does a few tests and if the tests fail it sends to the user a
request for authentication. But it's the server's task to validate the
credentials passed by the browser.
If you want for example to validate passwords against a database,
consult your servers documentation. You will probably have to install some filter or plugin.
It should be relatively easy to find such beasts on the net. I've written an ISAPI filter for this,
you may get it at http://jenda.krynicky.cz/authfilter.1.0.zip . Take it as an example, not as a solution!
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CGI/Ex/Auth.pm view on Meta::CPAN
$self->no_cookies_print;
return;
}
}
# oh - you're still here - well then - ask for login credentials
my $key_r = $self->key_redirect;
local $form->{$key_r} = $form->{$key_r} || $self->script_name . $self->path_info . (scalar(keys %$form) ? "?".$self->cgix->make_form($form) : '');
local $form->{'had_form_data'} = $args->{'had_form_data'} || 0;
$self->login_print;
my $data = $self->last_auth_data;
eval { die defined($data) ? $data : "Requesting credentials" };
# allow for a sleep to help prevent brute force
sleep($self->failed_sleep) if defined($data) && $data->error ne 'Login expired' && $self->failed_sleep;
$self->failure_hook;
view all matches for this distribution
view release on metacpan or search on metacpan
###########################################################
sub _login {
##
## check login credentials and load user profile
##
my $self = shift;
my ($username, $password) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CGI/Tiny/Cookbook.pod view on Meta::CPAN
}
};
=head2 Sessions
Regardless of the session mechanism, login credentials should only be sent over
HTTPS, and passwords should be stored on the server using a secure one-way
hash, such as with L<Crypt::Passphrase>.
L<Basic authentication|https://en.wikipedia.org/wiki/Basic_access_authentication>
has historically been used to provide a simplistic login session mechanism
which relies on the client to send the credentials with every subsequent
request in that browser session. However, it does not have a reliable logout or
session expiration mechanism.
Basic authentication can be handled by the CGI server itself (e.g.
L<Apache|https://httpd.apache.org/docs/2.4/howto/auth.html>), which restricts
lib/CGI/Tiny/Cookbook.pod view on Meta::CPAN
$cgi->render(text => "Welcome, $authed_user!");
};
A more sophisticated and modern login session mechanism is to store a session
cookie in the client, associated with a server-side session stored in a file or
database. Login credentials only need to be validated once per session, and
subsequently the session ID stored in the cookie will be sent by the client
with each request. This type of session can be ended by expiring the session
cookie and invalidating the session data on the server.
Some HTTP session management modules exist on CPAN, but the author has not yet
view all matches for this distribution
view release on metacpan or search on metacpan
t/20_valid_drupal.t view on Meta::CPAN
if ( exists $ENV{'DRUPAL_TEST_CREDS'} ) {
%params = ( split ',', $ENV{'DRUPAL_TEST_CREDS'} );
} else {
print <<EOT;
No database credentials found in ENV.
Skipping Drupal database tests.
If you want to run these tests in the future,
set the value of DRUPAL_TEST_CREDS in your ENV as
documented in the source of this file,
t/20_valid_drupal.t view on Meta::CPAN
$skip++;
}
SKIP: {
skip 'No database credentials supplied', 3, if $skip;
my $drupal;
my $dbh;
subtest 'Object instantiation', sub {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CMS/Drupal.pm view on Meta::CPAN
This module provides a Perl interface to a Drupal CMS website.
Since you can't do anything with Drupal until you can talk to the database,
this module doesn't do anything with the constructor but return a new object.
You can get a database handle to your Drupal by calling ->dbh() with your
database credentials as parameters.
You will need the appropriate DBI driver installed to connect to your
database. The DBI will hint at what you need if you don't have it, so
long as you set the 'driver' parameter correctly.
lib/CMS/Drupal.pm view on Meta::CPAN
=back
B<End Quote>
If you leave the environment variable set, in future you won't have to supply
any credentials when calling this module's ->dbh() method:
my $drupal = CMS::Drupal->new;
my $dbh = $drupal->dbh; # fatal error usually
It is not recommended to keep your credentials for a production database in
your environment as it's pretty easy to read it ...
=head1 SEE ALSO
=over 4
view all matches for this distribution
view release on metacpan or search on metacpan
corpus/dists/Ubic.changes view on Meta::CPAN
1.43 2012-06-16
* actually merge the fix
1.42 2012-06-15
* critical bugfix: fix credentials application order
(all non-root services were broken when operated from root, 1.39-1.41 releases were affected)
1.41 2012-06-11
* pid2cmd doesn't die on errors
* Ubic::Run supports the explicit service names
corpus/dists/Ubic.changes view on Meta::CPAN
1.39 2012-05-23
* new SimpleDaemon options:
- reload_signal
- daemon_user/daemon_group
* 'credentials' option in start_daemon()
* various doc improvements
1.38_01 2012-04-23
* freebsd credentials fix - set real uid first and effective uid after that
1.38 2012-04-14
* stable release
1.37_03 2012-04-13
corpus/dists/Ubic.changes view on Meta::CPAN
1.29 2011-06-07
* ubic-admin script: fix crontab install when user doesn't have previous crontab
* ubic script: fix 'ubic unknown-cmd' error reporting
* watchdog improvements:
- don't ask for status twice if service works
- permanently set credentials instead of using forks for non-root services
- log status obtained by status check, instead of just logging 'service is broken'
* POD improvements:
- Ubic::Manual::Intro
- Ubic::Manual::Multiservices
- various POD fixes
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CPAN/FTP.pm view on Meta::CPAN
} else {
$CPAN::Frontend->mywarn(" Could not determine host from http_proxy '$http_proxy'\n");
}
if ($want_proxy) {
my($user, $pass) =
CPAN::HTTP::Credentials->get_proxy_credentials();
$ret = {
proxy_user => $user,
proxy_pass => $pass,
http_proxy => $http_proxy
};
view all matches for this distribution