view release on metacpan or search on metacpan
lib/ACME/QuoteDB/LoadDB.pm view on Meta::CPAN
# # $@ and croak 'Cannot create database!';
# # $dbhc->disconnect; $dbhc = undef;
#
# my $drh = DBI->install_driver('mysql');
# my $rc = $drh->func("dropdb", $self->{db},
# [$self->{host}, $self->{user}, $self->{password}],
# 'admin'
# );
#
# $rc = $drh->func("createdb", $self->{db},
# [$self->{host}, $self->{user}, $self->{password}],
# 'admin'
# );
#}
# XXX refactor with sqlite
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ADAMK/Release.pm view on Meta::CPAN
my $pauseid = $self->prompt("PAUSEID:");
unless (_STRING($pauseid) and $pauseid =~ /^[A-Z]{3,}$/) {
$self->error("Missing or invalid PAUSEID");
}
my $password = $self->password("Password:");
unless (_STRING($password) and $password =~ /^\S{5,}$/) {
$self->error("Missing or invalid CPAN password");
}
# Execute the upload to CPAN
CPAN::Uploader->upload_file( $self->dist_tardist, {
user => $pauseid,
password => $password,
});
}
lib/ADAMK/Release.pm view on Meta::CPAN
sub prompt {
my $self = shift;
return IO::Prompt::Tiny::prompt(@_);
}
sub password {
my $self = shift;
my $password = undef;
if ( defined $_[0] ) {
print "$_[0] ";
}
eval {
Term::ReadKey::ReadMode('noecho');
$password = <STDIN>;
};
Term::ReadKey::ReadMode(0);
return undef if not defined $password;
chomp($password);
return $password;
}
1;
__END__
view all matches for this distribution
view release on metacpan or search on metacpan
# sub getentry { $_[0]->KAM_GetEntry($_[1],$_[2]); }
# sub debug { $_[0]->KAM_Debug(&AFS::KAMAJORVERSION); }
# sub getstats { $_[0]->KAM_GetStats(&AFS::KAMAJORVERSION); }
# sub randomkey { $_[0]->KAM_GetRandomKey; }
# sub create { $_[0]->KAM_CreateUser($_[1],$_[2],$_[3]); }
# sub setpassword { $_[0]->KAM_SetPassword($_[1],$_[2],$_[3],$_[4]); }
# sub delete { $_[0]->KAM_DeleteUser($_[1],$_[2]); }
# sub listentry { $_[0]->KAM_ListEntry($_[1],$_[2],$_[3]); }
# sub setfields { $_[0]->KAM_SetFields($_[1],$_[2],$_[3],$_[4],$_[5],$_[6],$_[7],$_[8]); }
view all matches for this distribution
view release on metacpan or search on metacpan
example/lava_lamp.pl view on Meta::CPAN
{
# AVM AHA Host for controlling the devices
host => "fritz.box",
# AVM AHA Password for connecting to the $AHA_HOST
password => "s!cr!t",
# AVM AHA user role (undef if no roles are in use)
user => undef,
# Name of AVM AHA switch
example/lava_lamp.pl view on Meta::CPAN
sub open_lamp {
my $config = shift;
my $name = shift || $config->{id};
return new Lamp($name,
$config->{host},
$config->{password},
$config->{user});
}
sub close_lamp {
my $lamp = shift;
example/lava_lamp.pl view on Meta::CPAN
sub new {
my $class = shift;
my $name = shift;
my $host = shift;
my $password = shift;
my $user = shift;
my $aha = new AHA($host,$password,$user);
my $switch = new AHA::Switch($aha,$name);
my $self = {
aha => $aha,
switch => $switch
view all matches for this distribution
view release on metacpan or search on metacpan
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
view all matches for this distribution
view release on metacpan or search on metacpan
$ for i in `micro structures`; do micro all $i; done; # echos all stuctures all words
$ for i in `micro ufo all`; do micro new $i; done; # new structure for all words in ufo
$ for i in `micro ufo all`; do micro-wiki $i; done; # push all words against the wiki plugin dont forget setting user & password in /usr/local/bin/micro-wiki
###################################################################################
# try to follow the logic combine
# your-word=micro new ? ->concept->concepts->relations->node
view all matches for this distribution
view release on metacpan or search on metacpan
config/association view on Meta::CPAN
# parameter in '<>' (e.g. '<debug>')
<database>CUI_Bigram
<hostname>192.168.24.89
<username>henryst
<password>OhFaht3eique
<socket>/var/run/mysqld.sock
<t>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AMF/Connection.pm view on Meta::CPAN
#
# sub command { } - to send "flex.messaging.messages.CommandMessage" instead
#
sub setCredentials {
my ($class, $username, $password) = @_;
$class->addHeader( 'Credentials', { 'userid' => $username,'password' => $password }, 0 );
};
sub _process_response_headers {
my ($class,$message) = @_;
lib/AMF/Connection.pm view on Meta::CPAN
=head2 getHTTPCookieJar ()
Return the current HTTP::Cookies jar in use.
=head2 setCredentials ($username,$password)
Minimal support for AMF authentication. Password seems to be wanted in clear.
=head2 setInputAMFOptions ($options)
view all matches for this distribution
view release on metacpan or search on metacpan
doc/examples/petmarket/petmarket/api/dbConn.pm view on Meta::CPAN
use strict;
my $dbhost = "localhost";
my $dbname = "database";
my $dbuser = "user";
my $dbpass = "password";
use DBI;
use AMF::Perl::Sql::MysqlRecordSet;
sub new
view all matches for this distribution
view release on metacpan or search on metacpan
sub HELP_MESSAGE()
{
my($fh) = @_;
print $fh "Usage:\n"
. " $me [-v] [-d] [-i <tunnelif>] [-a <localaddrs>] [-p <password>]\n"
. "Options:\n"
. " -v increase verbosity slightly to print error messages on stderr\n"
. " -d increase verbosity greatly (debug mode)\n"
. " -i <tunnelinterface>\n"
. " use the specified tunnel interface, defaults to tunl0\n"
. " -a <comma-separated-ip-list>\n"
. " ignore routes pointing to these (local) gateways\n"
. " (list contains system's local IP addresses by default)\n"
. " -p <password>\n"
. " use RIPv2 password 'authentication', defaults to none\n"
;
}
sub VERSION_MESSAGE()
{
if ($?) {
warn "route add failed: '$cmd': $out\n";
}
}
# process a RIPv2 password authentication entry
sub process_rip_auth_entry($)
{
my($entry) = @_;
my $e_af = unpack('n', substr($entry, 0, 2));
if ($e_af != 0xFFFF) {
warn "RIPv2 first message does not contain auth password: ignoring\n" if ($verbose);
return 0;
}
my $e_type = unpack('n', substr($entry, 2, 2));
if ($e_type != RIP_AUTH_PASSWD) {
my $e_passwd = substr($entry, 4, 16);
$e_passwd =~ s/\0*$//; # it's null-padded in the end
if (!defined $rip_passwd) {
warn "RIPv2 packet contains password $e_passwd but we require none\n" if ($verbose);
return 0;
}
if ($e_passwd ne $rip_passwd) {
warn "RIPv2 invalid password $e_passwd\n" if ($verbose);
return 0;
}
return 1;
}
return -1;
}
my $init_msg = 0;
# if password auth is required, require it!
if (defined $rip_passwd) {
return -1 if (!process_rip_auth_entry(substr($entries, 0, RIP_ENTRY_LEN)));
$init_msg += RIP_ENTRY_LEN;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AMQP.pm view on Meta::CPAN
sub server {
my ($self,$url) = @_;
$url ||= ''; # incase we don't pass a url
$url =~ /amqp:\/\/
(?<username>[^:]+):
(?<password>[^@]+)@
(?<hostname>[^:\/]+):
(?<port>\d+)\/
(?<vhost>[^\/]*)
/x;
$self->host($+{'hostname'} || 'localhost');
$self->port($+{'port'} || 5672);
$self->vhost($+{'vhost'} || '/');
$self->username($+{'username'} || 'guest');
$self->password($+{'password'} || 'guest');
say "amqp://" . $self->host . ":" . $self->port . $self->vhost if $self->debug;
$self;
}
1;
lib/AMQP.pm view on Meta::CPAN
B<server($url)>
Configures all of the connection settings based on an AMQP url. The format of which is:
amqp://username:password@host:port/vhost
All of the elements of the url are required if you are not using the defaults. The default settings are:
amqp://guest:guest@localhost:5672/
view all matches for this distribution
view release on metacpan or search on metacpan
=head1 SYNOPSIS
use AOL::TOC;
$toc = AOL::TOC::new($toc_server, $login_server, $port,
$screenname, $password);
$toc->connect();
=head1 DESCRIPTION
This module implements SFLAP, which I presume to be AOL's authenticiation
Net::AIM, a new module, but it doesn't have the features of this one
=cut
sub roast_password {
my ($password, $key) = @_;
my @skey;
my $rpassword = "0x";
my $i = 0;
if (!$key) { $key = $ROASTING_KEY; }
@skey = split('', $key);
for $c (split('', $password)) {
$p = unpack("c", $c);
$k = unpack("c", @skey[$i % length($key)]);
$rpassword = sprintf("%s%02x", $rpassword, $p ^ $k);
$i ++;
}
return ($rpassword);
}
sub encode_string {
my ($self, $str) = @_;
}
}
sub new {
my ($tochost, $authorizer, $port, $nickname, $password) = @_;
my ($self, $ipaddr, $sflap);
$self = {
nickname => $nickname,
password => $password,
caller => "file:line"
};
bless($self);
$self->{sflap} = $sflap;
#print "*************************** AOL::TOC::new(...) sflap = $self->{sflap}\n";
#print " sflap cb = $self->{sflap}{callback}\n";
#$self->{sflap}->register_callback($AOL::SFLAP::SFLAP_SIGNON, \&sflap_signon, $password, "english", "TIK:\$Revision: 1.148 \$", $self);
#$self->{sflap}->register_callback($AOL::SFLAP::SFLAP_DATA, \&sflap_data, $self);
#$self->{sflap}->register_callback($AOL::SFLAP::SFLAP_ERROR, \&sflap_error, $self);
#$self->{sflap}->register_callback($AOL::SFLAP::SFLAP_SIGNOFF, \&sflap_signoff, $self);
#$self->{sflap}->register_callback($AOL::SFLAP::SFLAP_KEEPALIVE, \&sflap_keepalive, $self);
#
sub connect {
my ($self) = @_;
$self->{sflap}->register_callback($AOL::SFLAP::SFLAP_SIGNON, \&sflap_signon, $self->{password}, "english", "TIK:\$Revision: 1.148 \$", $self);
$self->{sflap}->register_callback($AOL::SFLAP::SFLAP_DATA, \&sflap_data, $self);
$self->{sflap}->register_callback($AOL::SFLAP::SFLAP_ERROR, \&sflap_error, $self);
$self->{sflap}->register_callback($AOL::SFLAP::SFLAP_SIGNOFF, \&sflap_signoff, $self);
$self->{sflap}->register_callback($AOL::SFLAP::SFLAP_KEEPALIVE, \&sflap_keepalive, $self);
# Utilities
sub signon {
my ($self, $authorizer, $port, $nickname, $roasted_password, $language, $version) = @_;
$self->send("toc_signon $authorizer $port $nickname $roasted_password $language " . &encode_string($version));
return;
}
sub init_done {
my ($self) = @_;
# SFLAP Callbacks
sub sflap_signon {
my ($self, $data, $password, $language, $version, $toc) = @_;
my ($buffer, $roasted_password);
$roasted_password = roast_password($password, $ROASTING_KEY);
$buffer = pack("Nnna*", 1, 1, length($toc->{sflap}->{nickname}), $toc->{sflap}->{nickname});
$toc->{sflap}->send($AOL::SFLAP::SFLAP_SIGNON, $buffer);
$toc->signon($toc->{sflap}->{authorizer}, $toc->{sflap}->{port}, $toc->{sflap}->{nickname}, $roasted_password, $language, $version);
}
sub sflap_data {
my ($self, $data, $toc) = @_;
my ($cmd, $args);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AOLserver/CtrlPort.pm view on Meta::CPAN
my $conn = AOLserver::CtrlPort->new(
Host => 'myhost',
Port => 3456,
User => 'username',
Password => 'password',
);
my $out = $conn->send_cmds(<<EOT);
info tclversion
EOT
lib/AOLserver/CtrlPort.pm view on Meta::CPAN
ones:
ns_section "ns/server/${servername}/module/nscp"
ns_param address myhostname
ns_param port 3334
ns_param echopassword 1
ns_param cpcmdlogging 1
ns_section "ns/server/${servername}/module/nscp/users"
ns_param user "username:3G5/H31peci.o:"
# That's "username:password"
ns_section "ns/server/${servername}/modules"
ns_param nscp ${bindir}/nscp.so
This lets AOLserver enable the control port on server C<myhostname> on port
3334. Authentication is on, the username is C<username> and the
password is C<password> (hashed to C<3G5/H31peci.o> with a program
like C<htpasswd>).
=head2 METHODS
=over 4
view all matches for this distribution
view release on metacpan or search on metacpan
lib/API/Assembla.pm view on Meta::CPAN
return LWP::UserAgent->new;
}
);
has 'password' => (
is => 'ro',
isa => 'Str',
required => 1
);
lib/API/Assembla.pm view on Meta::CPAN
sub make_req {
my ($self, $path) = @_;
my $req = HTTP::Request->new(GET => $self->url.$path);
$req->header(Accept => 'application/xml');
$req->authorization_basic($self->username, $self->password);
return $req;
}
__PACKAGE__->meta->make_immutable;
lib/API/Assembla.pm view on Meta::CPAN
use API::Assembla;
my $api = API::Asembla->new(
username => $username,
password => $password
);
my $href_of_spaces = $api->get_spaces;
# Got an href of API::Assembla::Space objects keyed by space id
my $space = $api->get_space($space_id);
lib/API/Assembla.pm view on Meta::CPAN
API::Assembla is a Perl interface to L<Assembla|http://www.assembla.com/>, a
ticketing, code hosting collaboration tool.
=head1 ATTRIBUTES
=head2 password
The password to use when logging in.
=head2 url
The URL to use when working with the api. Defaults to
view all matches for this distribution
view release on metacpan or search on metacpan
lib/API/Basecamp.pm view on Meta::CPAN
is => 'rw',
isa => Str,
required => 1,
);
has password => (
is => 'rw',
isa => Str,
required => 1,
);
lib/API/Basecamp.pm view on Meta::CPAN
# CONSTRUCTION
after BUILD => method {
my $username = $self->username;
my $password = $self->password;
my $account = $self->account;
my $version = $self->version;
my $userinfo = "$username:$password";
my $url = $self->url;
$url->path("/$account/api/v$version");
$url->userinfo($userinfo);
lib/API/Basecamp.pm view on Meta::CPAN
timeout => $self->timeout,
user_agent => $self->user_agent,
account => $self->account,
identifier => $self->identifier,
username => $self->username,
password => $self->password,
version => $self->version,
);
# resource locator
my $url = $instance->url;
lib/API/Basecamp.pm view on Meta::CPAN
use API::Basecamp;
my $basecamp = API::Basecamp->new(
username => 'USERNAME',
password => 'PASSWORD',
identifier => 'APPLICATION NAME',
account => 'ACCOUNT NUMBER',
);
$basecamp->debug(1);
lib/API/Basecamp.pm view on Meta::CPAN
$basecamp->identifier;
$basecamp->identifier('IDENTIFIER');
The identifier attribute should be set to a string that identifies your application.
=head2 password
$basecamp->password;
$basecamp->password('PASSWORD');
The password attribute should be set to the account holder's password.
=head2 username
$basecamp->username;
$basecamp->username('USERNAME');
view all matches for this distribution
view release on metacpan or search on metacpan
lib/API/BigBlueButton/Requests.pm view on Meta::CPAN
use Digest::SHA1 qw/ sha1_hex /;
use Carp qw/ confess /;
use constant {
REQUIRE_CREATE_PARAMS => [ qw/ meetingID / ],
REQUIRE_JOIN_PARAMS => [ qw/ fullName meetingID password / ],
REQUIRE_ISMEETINGRUNNING_PARAMS => [ qw/ meetingID / ],
REQUIRE_END_PARAMS => [ qw/ meetingID password / ],
REQUIRE_GETMEETINGINFO_PARAMS => [ qw/ meetingID password / ],
REQUIRE_PUBLISHRECORDINGS_PARAMS => [ qw/ recordID publish / ],
REQUIRE_DELETERECORDINGS_PARAMS => [ qw/ recordID / ],
REQUIRE_SETCONFIGXML_PARAMS => [ qw/ meetingID configXML / ],
};
lib/API/BigBlueButton/Requests.pm view on Meta::CPAN
meetingID
This parameter is mandatory.
The meeting ID that identifies the meeting you are attempting to join.
password
This parameter is mandatory.
The password that this attendee is using. If the moderator password is supplied,
he will be given moderator status (and the same for attendee password, etc)
createTime
This parameter is optional.
lib/API/BigBlueButton/Requests.pm view on Meta::CPAN
meetingID
This parameter is mandatory.
The meeting ID that identifies the meeting you are attempting to end.
password
This parameter is mandatory.
The moderator password for this meeting. You can not end a meeting using the attendee password.
=cut
sub end {
my ( $self, %params ) = @_;
lib/API/BigBlueButton/Requests.pm view on Meta::CPAN
meetingID
This parameter is mandatory.
The meeting ID that identifies the meeting you are attempting to check on.
password
This parameter is mandatory.
The moderator password for this meeting.
You can not get the meeting information using the attendee password.
=cut
sub getmeetinginfo {
my ( $self, %params ) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
examples/githubcl-appspec.yaml view on Meta::CPAN
securityDefinitions:
oauth_2_0:
authorizationUrl: https://github.com/login/oauth/authorize
description: |
OAuth2 is a protocol that lets external apps request authorization to private
details in a user's GitHub account without getting their password. This is
preferred over Basic Authentication because tokens can be limited to specific
types of data, and can be revoked by users at any time.
flow: accessCode
scopes:
admin:org: ''
view all matches for this distribution
view release on metacpan or search on metacpan
lib/API/CPanel.pm view on Meta::CPAN
my $user_name = 'user1';
my $client_creation_result = API::CPanel::user::create( {
%{ $connection_params },
username => $user_name,
password => 'user_password',
domain => $dname,
});
# Switch off account:
my $suspend_result = API::CPanel::user::disable( {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/API/DirectAdmin.pm view on Meta::CPAN
my $email = 'user1@example.com';
my $package = 'newpackage';
my $client_creation_result = $da->user->create( {
username => $user_name,
passwd => 'user_password',
passwd2 => 'user_password',
domain => $dname,
email => $email,
package => $package,
ip => $ip,
});
lib/API/DirectAdmin.pm view on Meta::CPAN
Example:
my $result = $da->user->create( {
username => 'username',
passwd => 'user_password',
passwd2 => 'user_password',
domain => 'example.com',
email => 'email@example.com',
package => 'package_name',
ip => 'IP.ADD.RE.SS',
});
lib/API/DirectAdmin.pm view on Meta::CPAN
my $enable_result = $da->user->enable( {
select0 => 'username',
} );
=item change_password
Change password for user
Example:
my $result = $da->user->change_password( {
username => 'username',
passwd => 'new_password',
passwd2 => 'new_password',
} );
=item change_package
Change package (tariff plan) for user
lib/API/DirectAdmin.pm view on Meta::CPAN
=item show_packages
Return list of available packages.
Note: If you created packages through administrator user - you must use admin's login and password for authorisation. Obviously, if packages was created by reseller user - use reseller authorisation.
Example:
my $packages = $da->user->show_packages();
lib/API/DirectAdmin.pm view on Meta::CPAN
=item add
Add new domain to user through you connect to server.
Note: For adding domains for customers and you don't khow their password use: auth_user = 'admin_name|customer_name' in auth hash.
Example:
my %auth = (
auth_user => 'admin_name|customer_name',
lib/API/DirectAdmin.pm view on Meta::CPAN
my $da = API::DirectAdmin->new(%auth);
my $result = $da->mysql->adddb( {
name => 'default', # will be 'customer_default'
user => 'default', # will be 'customer_default'
passwd => 'password',
passwd2 => 'password',
} );
=item deldb
Delete selected database from user.
view all matches for this distribution
view release on metacpan or search on metacpan
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
view all matches for this distribution
view release on metacpan or search on metacpan
config/openx/oauth/private/config.yml view on Meta::CPAN
---
email: blah@blah.com
password: blahblah1
api_key: 123348234
api_secret: 1203123
view all matches for this distribution
view release on metacpan or search on metacpan
add_database.pl view on Meta::CPAN
#
# Script for add databases account to certain user account in ISPManager
#
die "Params required: host / username / password / db_name / db_user / db_password\n" unless scalar @ARGV == 6;
my $host = $ARGV[0];
my $login = $ARGV[1];
my $password = $ARGV[2];
my $db_name = $ARGV[3];
my $db_user = $ARGV[4];
my $db_pass = $ARGV[5];
$API::ISPManager::DEBUG = '';
my %connection_params = (
username => $login,
password => $password,
host => $host,
path => 'manager',
);
add_database.pl view on Meta::CPAN
name => $db_name,
dbtype => 'MySQL',
dbencoding => 'default',
dbuser => 'newuser',
dbusername => $db_user,
dbpassword => $db_pass,
dbconfirm => $db_pass,
} );
if ($db_creation_result) {
view all matches for this distribution
view release on metacpan or search on metacpan
example/list_videochats.pl view on Meta::CPAN
use API::MailboxOrg;
use Data::Printer;
my $api = API::MailboxOrg->new(
user => 'test@example.tld',
password => 'a_password',
);
my $result = $api->videochat->list( mail => 'test@example.tld' );
p $result;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/API/MikroTik.pm view on Meta::CPAN
our $VERSION = 'v0.242';
has error => '';
has host => '192.168.88.1';
has ioloop => sub { Mojo::IOLoop->new() };
has password => '';
has port => 0;
has timeout => 10;
has tls => 1;
has user => 'admin';
has _tag => 0;
lib/API/MikroTik.pm view on Meta::CPAN
},
sub {
my ($delay, $err, $res) = @_;
return $self->$cb($err) if $err;
my $secret
= md5_sum("\x00", $self->password, pack 'H*', $res->[0]{ret});
$self->_command($loop, '/login',
{name => $self->user, response => "00$secret"},
undef, $delay->begin());
},
sub {
lib/API/MikroTik.pm view on Meta::CPAN
$api = $api->loop(Mojo::IOLoop->new());
Event loop object to use for blocking operations, defaults to L<Mojo::IOLoop>
object.
=head2 password
my $pass = $api->password;
$api = $api->password('secret');
Password for authentication. Empty string by default.
=head2 port
view all matches for this distribution
view release on metacpan or search on metacpan
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
view all matches for this distribution
view release on metacpan or search on metacpan
lib/API/ParallelsWPB.pm view on Meta::CPAN
$class = ref $class || $class;
my $self = {
username => '',
password => '',
server => '',
api_version => '5.3',
debug => 0,
timeout => 30,
(@_)
};
map { confess "Field '" . $_ . "' required!" unless $self->{ $_ } } qw/username password server/;
return bless $self, $class;
}
# "free" request. Basic method for requests
lib/API/ParallelsWPB.pm view on Meta::CPAN
if ( $data->{req_type} eq 'POST' || $data->{req_type} eq 'PUT' ) {
$req->header( 'content-type' => 'application/json' );
$req->content( $post_data );
}
$req->authorization_basic( $self->{username}, $self->{password} );
$ua->ssl_opts( verify_hostname => 0 );
$ua->timeout( $self->{timeout} );
warn $req->as_string if ( $self->{debug} );
lib/API/ParallelsWPB.pm view on Meta::CPAN
version 0.03
=head1 SYNOPSIS
my $client = API::ParallelsWPB->new( username => 'admin', password => 'passw0rd', server => 'builder.server.mysite.ru' );
my $response = $client->get_sites_info;
if ( $response->success ) {
for my $site ( @{ $response->response } ) {
say "UUID: ". $site->{uuid};
}
lib/API/ParallelsWPB.pm view on Meta::CPAN
=item username
Username for connection to Parallels WebPresence Builder instance. Required parameter.
=item password
Password for connection to Parallels WebPresence Builder instance. Required parameter.
=item server
view all matches for this distribution
view release on metacpan or search on metacpan
lib/API/Plesk.pm view on Meta::CPAN
my $class = shift;
$class = ref ($class) || $class;
my $self = {
username => '',
password => '',
secret_key => '',
url => '',
api_version => '1.6.3.1',
debug => 0,
timeout => 30,
(@_)
};
if (!$self->{secret_key}) {
confess "Required username!" unless $self->{username};
confess "Required password!" unless $self->{password};
}
confess "Required url!" unless $self->{url};
return bless $self, $class;
}
lib/API/Plesk.pm view on Meta::CPAN
if ($self->{secret_key}) {
$req->push_header(':KEY', $self->{secret_key});
} else {
$req->push_header(':HTTP_AUTH_LOGIN', $self->{username});
$req->push_header(':HTTP_AUTH_PASSWD', $self->{password});
}
$req->content_type('text/xml; charset=UTF-8');
$req->content($xml);
# LWP6 hack to prevent verification of hostname
lib/API/Plesk.pm view on Meta::CPAN
use API::Plesk;
my $api = API::Plesk->new(
username => 'user', # required
password => 'pass', # required
url => 'https://127.0.0.1:8443/enterprise/control/agent.php', # required
api_version => '1.6.3.1',
debug => 0,
timeout => 30,
);
lib/API/Plesk.pm view on Meta::CPAN
Create new class instance.
Required params:
username
password
url
Additional params:
api_version - default 1.6.3.1
debug - default 0
view all matches for this distribution
view release on metacpan or search on metacpan
lib/API/PleskExpand.pm view on Meta::CPAN
Create new class instance.
Required params:
api_version -- default: 2.2.4.1
username -- Expand user name (root as default).
password -- Expand password.
url -- full url to Expand XML RPC gate (https://ip.ad.dr.ess::8442/webgate.php').
=cut
lib/API/PleskExpand.pm view on Meta::CPAN
$operator = 'exp_plesk_domain';
}
my $headers = {
':HTTP_AUTH_LOGIN' => $self->{'username'},
':HTTP_AUTH_PASSWD' => $self->{'password'},
':HTTP_AUTH_OP' => $operator
};
return $headers if $self->{'dump_headers'};
view all matches for this distribution
view release on metacpan or search on metacpan
ReviewBoard.pm view on Meta::CPAN
#Init's the ReviewBoard Class.
my $rb = ReviewBoard->new( hostedurl => 'http://hostedurl.reviewboard.com',
username => 'user',
password => 'password' );
print "*****************************************************\n";
print " UnitTest to exercise ReviewBoard Class API's \n";
print " Author: chetang\@cpan.org \n";
ReviewBoard.pm view on Meta::CPAN
=head1 METHODS
=head2 my $rb = API::ReviewBoard->new( hostedurl => 'http://reviewboard.company.com',
username => 'user',
password => 'passwd' );
Creates a new API::ReviewBoard object.
=cut
sub new {
my $class = shift;
ReviewBoard.pm view on Meta::CPAN
%args = validate(
@_,
{
hostedurl => { type => SCALAR, optional => 0 },
username => { type => SCALAR, optional => 0 },
password => { type => SCALAR, optional => 0 },
}
);
$self->{_owner} = $$;
$self->{_hostedurl} = $args{hostedurl};
$self->{_username} = $args{username};
$self->{_password} = $args{password};
$self->{_useragent} = LWP::UserAgent->new;
$self->{_cookie_jar} = HTTP::Cookies->new(file => "lwpcookies.txt", autosave => 1);
# post request to login
my $link = $self->{_hostedurl}.'api/json/accounts/login/';
my $request = new HTTP::Request('POST',$link);
my $content = 'username='.$self->{_username}.'&password='.$self->{_password};
$request->content($content);
my $response = $self->{_useragent}->simple_request($request);
# extract cookie from response header
$self->{_cookie_jar}->extract_cookies($response);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/APP/REST/RestTestSuite.pm view on Meta::CPAN
my ( $config, $total, $total_response_time, $skip, $pass, $fail ) = (0) x 6;
my ( $uri, $method, $req_content_type, $req_body, $status ) = (undef) x 5;
my ( $request, $response ) = (undef) x 2;
my ( $username, $password ) = (undef) x 2;
$username = $self->{username};
$password = $self->{password};
my $fh = $self->get_log_file_handle();
my $err_fh = $self->get_err_log_file_handle();
if ( $self->{html_log_required}
lib/APP/REST/RestTestSuite.pm view on Meta::CPAN
$req_body = $tc->{request_body} || 0;
$status = $tc->{response_status};
if ( $tc->{request_method} =~ /get/i ) {
$request = HTTP::Request->new( $method, $uri );
$request->authorization_basic( $username, $password )
if ( $username && $password );
} else {
$request =
HTTP::Request->new( $method, $uri, new HTTP::Headers, $req_body );
$request->authorization_basic( $username, $password )
if ( $username && $password );
$request->content_type($req_content_type);
$request->content_length( length($req_body) );
}
print STDERR "Executing Test case $count => $tc->{test_case}";
lib/APP/REST/RestTestSuite.pm view on Meta::CPAN
$pua->default_header('Accept' => '*/*'); # to get cross platform support
my ( $config, $total, $total_response_time, $skip, $pass, $fail ) = (0) x 6;
my ( $uri, $method, $req_content_type, $req_body, $status ) = (undef) x 5;
my ( $request, $response ) = (undef) x 2;
my ( $username, $password ) = (undef) x 2;
$username = $self->{username};
$password = $self->{password};
my $fh = $self->get_log_file_handle();
if ( $self->{html_log_required}
&& ( $self->{html_log_required} =~ /yes/i ) )
lib/APP/REST/RestTestSuite.pm view on Meta::CPAN
$req_content_type = $tc->{request_content_type};
$req_body = $tc->{request_body} || 0;
$status = $tc->{response_status};
my $request = HTTP::Request->new( $method, $uri );
$request->authorization_basic( $username, $password )
if ( $username && $password );
push( @reqs, $request );
}
$total++;
lib/APP/REST/RestTestSuite.pm view on Meta::CPAN
my ( $self, %args ) = @_;
if ( $self->{username} ) {
print STDERR "username configured: $self->{username}\n";
print STDERR "Password: ";
chomp( $self->{password} = <STDIN> );
}
if ( $self->{endpoint} && $self->{port} && $self->{base_uri} ) {
$self->{rest_uri_base} =
qq|http://$self->{endpoint}|
view all matches for this distribution