view release on metacpan or search on metacpan
t/t-data/example-screen-layout.xml view on Meta::CPAN
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?><hierarchy rotation="0"><node index="0" text="" resource-id="" class="android.widget.FrameLayout" package="com.huawei.android.launcher" content-desc="" checkable="false" checked="false" clickabl...
view all matches for this distribution
view release on metacpan or search on metacpan
Annelidous/Search/Ubersmith.pm view on Meta::CPAN
# Authentication per-service
# I.E. sub-accounts
sub auth_service {
my $self=shift;
my $username=shift;
my $password=shift;
my $c=$self->find("and username=? and password=?", $username,$password);
# Return the single authorized package/service.
return [$c->{id}];
}
# Authentication per-account
# I.E. master accounts
sub auth_account {
my $self=shift;
my $username=shift;
my $password=shift;
my @cl=$self->db_fetch("select clientid from CLIENT where clientid=? and password=? limit 1",$username,$password);
if ($#cl > -1) {
return $self->authorized_services($cl[0]->{clientid});
}
return 0;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnnoCPAN/Control.pm view on Meta::CPAN
}
=item $obj->Create_user
Coming from the New_user form, create a new account. Uses the login, passwd,
passwd2, and email CGI parameters. Checks that the login and password are not
blank, that the passwords match, and that the login is not already taken.
=cut
sub Create_user {
my ($self) = @_;
lib/AnnoCPAN/Control.pm view on Meta::CPAN
my $passwd = $self->param('passwd');
my $passwd2 = $self->param('passwd2');
my $email = $self->param('email');
my %vars = (login => $login, email => $email);
return ({%vars, error => "missing password"}, "new_user")
unless (length $passwd);
return ({%vars, error => "missing login"}, "new_user")
unless (length $login);
lib/AnnoCPAN/Control.pm view on Meta::CPAN
if (AnnoCPAN::DBI::User->retrieve(username => $login)) {
return ({%vars, error => 'login already taken'}, "new_user");
}
if ($passwd ne $passwd2) {
return ({%vars, error => "passwords don't match"}, "new_user");
}
my $user = AnnoCPAN::DBI::User->create({
username => $login,
password => crypt($passwd, $login),
email => $email,
member_since => time,
privs => 1,
});
$self->set_login_cookies($user);
lib/AnnoCPAN/Control.pm view on Meta::CPAN
sub Login {
my ($self) = @_;
my $passwd = $self->param('passwd');
my $user = eval { $self->param_obj('User', 'username') };
unless ($user and crypt($passwd, $user->password) eq $user->password) {
return $self->Main({error => 'invalid login/password'});
}
$self->set_login_cookies($user);
my $from = $self->param('from');
$self->redirect($from =~ /logout/ ? '/' : $from);
return;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Ansible/Util/Roles/Constants.pm view on Meta::CPAN
version 0.001
=cut
use constant {
ARGS_VAULT_PASS_FILE => '--vault-password-file',
CACHE_NS_VARS => 'ansible-vars',
CACHE_KEY => 'default',
CMD_ANSIBLE_PLAYBOOK => 'ansible-playbook',
DEFAULT_CACHE_EXPIRE_SECS => 60 * 10, # 10 mins
};
view all matches for this distribution
view release on metacpan or search on metacpan
SECURITY.md view on Meta::CPAN
issues.**
Privately report vulnerabilities to the maintainers listed at the end
of this document. Include as many details as possible to reproduce the
issue, including code samples or test cases. Check that your report
does not expose any of your sensitive data, such as passwords, tokens,
or other secrets.
You do not need to have a solution or fix. Depending on the issue,
CPANSec may be notified. Depending on the issue, CPANSec may be
notified.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyData.pm view on Meta::CPAN
# read a remote file and access it via a tied hash
#
my $table = adTie( 'XML', 'http://www.foo.edu/bar.xml' );
# same with username/password
#
my $table = ( 'XML', 'ftp://www.foo.edu/pub/bar.xml', 'r'
{ user => 'me', pass => 'x7dy4'
);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/ClickHouse.pm view on Meta::CPAN
my %_param = (
host => '127.0.0.1',
port => 8123,
database => 'default',
user => undef,
password => undef
);
foreach my $_key ( keys %_param ) {
unless ($param->{$_key}){
$param->{$_key} = $_param{$_key};
}
}
unless ($param->{uri}) {
my $_uri = URI->new(sprintf ("http://%s:%d/",$param->{host},$param->{port}));
$_uri->query_param('user' => $param->{user}) if $param->{user};
$_uri->query_param('password' => $param->{password}) if $param->{password};
$_uri->query_param('database' => $param->{database});
$param->{uri} = $_uri;
}
return $param;
lib/AnyEvent/ClickHouse.pm view on Meta::CPAN
clickhouse_select
{ # connection options
host => '127.0.0.1',
port => 8123,
user => 'Harry',
password => 'Alohomora',
database => 'Hogwarts'
},
'select * from test FORMAT Pretty', # query
sub { # callback function if status ok 200
my $data = shift;
lib/AnyEvent/ClickHouse.pm view on Meta::CPAN
clickhouse_select
{
host => '127.0.0.1',
user => 'Harry',
password => 'Alohomora'
},
'select * from test',
sub { # callback function if status ok 200
my $data = shift;
lib/AnyEvent/ClickHouse.pm view on Meta::CPAN
use URI;
use URI::QueryParam;
my $uri = URI->new(sprintf ("http://%s:%d/",'127.0.0.1',8123)); # host and port
$uri->query_param('user' => 'Harry');
$uri->query_param('password' => 'Alohomora');
$uri->query_param('database' => 'default');
clickhouse_select
{
uri => $uri
lib/AnyEvent/ClickHouse.pm view on Meta::CPAN
clickhouse_do
{
host => '127.0.0.1',
user => 'Harry',
password => 'Alohomora'
},
"INSERT INTO test (id, f1, f2) VALUES",
sub { # callback function if status ok 200
my $data = shift;
# do something
lib/AnyEvent/ClickHouse.pm view on Meta::CPAN
clickhouse_select_array
{
host => '127.0.0.1',
user => 'Harry',
password => 'Alohomora'
},
'select * from test',
sub { # callback function if status ok 200
my $data = shift;
lib/AnyEvent/ClickHouse.pm view on Meta::CPAN
clickhouse_select_hash
{
host => '127.0.0.1',
user => 'Harry',
password => 'Alohomora'
},
'select * from test',
sub { # callback function if status ok 200
my $data = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/CouchDB.pm view on Meta::CPAN
$db = couchdb('database');
$db = couchdb('http://somewhere.com:7777/database/');
With authentication:
# user is the username and s3cret is the password
$db = couchdb('http://user:s3cret@somewhere.com:7777/database');
Work with individual CouchDB documents;
my $user = $db->open_doc('~larry')->recv;
view all matches for this distribution
view release on metacpan or search on metacpan
t/superfluous_warning.t view on Meta::CPAN
local *STDERR;
open STDERR, '>', \my $stderr or die $!;
# failed connect (because of wrong port 3307) will add undefined $dbh into {CachedKids}
AnyEvent::DBI::MySQL->connect($h->dsn.';port=3307', $h->username, $h->password,
{RaiseError=>0,PrintError=>0});
# passed connect shouldn't print warnings because of undefined $dbh in {CachedKids}
AnyEvent::DBI::MySQL->connect($h->connection_info,
{RaiseError=>0,PrintError=>0});
# work around warning in EV because ./Build test run `perl -w`
view all matches for this distribution
view release on metacpan or search on metacpan
t/fake-mysql view on Meta::CPAN
specific queries to specific DSNs. If you do not want non-matching queries to
be forwarded, either create a match-all rule at the bottom of your last
configuration file or omit the C<--dsn> option. If you omit the option, an
error message will be sent to the client.
C<--dsn_user> and C<--dsn_password> can be used to specify username and
password for DBI drivers where those can not be specified in the DSN string.
=head1 RULES
Rules to be executed are contained in configuration files. The configuration
files are actually standard perl scripts and are executed as perl
t/fake-mysql view on Meta::CPAN
on the command line.
C<dsn> behaves identically, however a database handle is contructed from the
C<dsn> provided and an attempt is made to connect to the database. If C<dsn> is
a reference to an array, the first item from the array is used as a DSN, the
second one is used as username and the third one is used as password.
C<before> this can be a reference to a subroutine that will be called after a
matching query has been encountered but before any further processing has taken
place. The subroutine will be called with the text of the query as the first
argument, followed by extra arguments containing the strings matched from any
t/fake-mysql view on Meta::CPAN
specific rule has its own C<dsn>, the value of those variables will always
refer to the default C<dbh> and C<dsn>. If you change the <dsn> variable, the
system will attempt to connect to the new dsn string and will produce a new
C<dbh> handle from it. If you set C<dsn> to an array reference, the first item
will be used as a DSN, the second one as a username and the third one as a
password. C<dsn_user> and C<dsn_password> can be used for the same purpose.
C<args> contains a reference to the C<@ARGV> array, that is, the command line
options that evoked myserver.pl
C<remote_dsn>, C<remote_dsn_user> and C<remote_dsn_password> are convenience
variables that can also be specified on the command line. It is not used by
C<myserver.pl> however you can use it in your rules, the way
C<remotequery.conf> does.
=head1 SECURITY
t/fake-mysql view on Meta::CPAN
temporary table on the default server and substitute the C<REMOTE_SELECT> part
in the orignal query with a reference to the temoporary table. The following
scenarios are possible:
# Standalone usage
mysql> SELECT REMOTE * FROM mysql.user ON 'dbi:mysql:host=remote:user=foo:password=bar'
# CREATE ... SELECT usage
mysql> CREATE TABLE local_table SELECT REMOTE * FROM remote_table ON 'dbi:mysql:host=remote'
# Non-correlated subquery
mysql> SELECT *
mysql> FROM (SELECT REMOTE * FROM mysql_user ON 'dbi:mysql:host=remote:user=foo:password=bar')
mysql> WHERE user = 'mojo'
# Specify remote dsn on the command line
shell> ./myserver.pl --config=remotequery.conf --dsn=dbi:mysql: --remote_dsn=dbi:mysql:host=host2
mysql> select remote 1;
t/fake-mysql view on Meta::CPAN
$SIG{CHLD} = 'IGNORE';
my $start_dsn;
my $start_dsn_user;
my $start_dsn_password;
my $remote_dsn;
my $remote_dsn_user;
my $remote_dsn_password;
my $port = '23306';
my $interface = '127.0.0.1';
my $debug;
my @config_names;
t/fake-mysql view on Meta::CPAN
my @args = @ARGV;
my $result = GetOptions(
"dsn=s" => \$start_dsn,
"dsn_user=s" => \$start_dsn_user,
"dsn_password=s" => \$start_dsn_password,
"remote_dsn=s" => \$remote_dsn,
"remote_dsn_user=s" => \$remote_dsn_user,
"remote_dsn_password=s" => \$remote_dsn_password,
"port=i" => \$port,
"config=s" => \@config_names,
"if|interface|ip=s" => \$interface,
"debug" => \$debug
) or die;
t/fake-mysql view on Meta::CPAN
@ARGV = @args;
my $start_dbh;
if (defined $start_dsn) {
print localtime()." [$$] Connecting to DSN $start_dsn.\n" if $debug;
$start_dbh = DBI->connect($start_dsn, $start_dsn_user, $start_dsn_password);
}
$storage{dbh} = $start_dbh;
$storage{dsn} = $start_dsn;
$storage{dsn_user} = $start_dsn_user;
$storage{dsn_password} = $start_dsn_password;
$storage{remote_dsn} = $remote_dsn;
$storage{remote_dsn_user} = $remote_dsn_user;
$storage{remote_dsn_password} = $remote_dsn_password;
foreach my $config_name (@config_names) {
my $config_sub;
open (CONFIG_FILE, $config_name) or die "unable to open $config_name: $!";
read (CONFIG_FILE, my $config_text, -s $config_name);
t/fake-mysql view on Meta::CPAN
if (ref($rule->{dsn}) eq 'ARRAY') {
print localtime()." [$$] Connecting to DSN $rule->{dsn}->[0].\n" if $debug;
$myserver->setDbh(DBI->connect(@{$rule->{dsn}}));
} else {
print localtime()." [$$] Connecting to DSN $rule->{dsn}.\n" if $debug;
$myserver->setDbh(DBI->connect($rule->{dsn}, get('dsn_user'), get('dsn_password')));
}
}
if (not defined get('dbh')) {
error("No --dbh specified. Can not forward query.",1235, 42000);
} elsif ($command == DBIx::MyServer::COM_QUERY) {
t/fake-mysql view on Meta::CPAN
if (ref($value) eq 'ARRAY') {
print localtime()." [$$] Connecting to DSN $value->[0].\n" if $debug;
$dbh = DBI->connect(@{$value});
} else {
print localtime()." [$$] Connecting to DSN $value.\n" if $debug;
$dbh = DBI->connect($value, get('dsn_user'), get('dsn_password'));
}
$storage{myserver}->setDbh($dbh);
$storage{dbh} = $dbh;
} else {
$storage{myserver}->setDbh(undef);
view all matches for this distribution
view release on metacpan or search on metacpan
example/fget.pl view on Meta::CPAN
{
say STDERR "only FTP URLs are supported";
exit 2;
}
unless(defined $remote->password)
{
$remote->password(prompt('p', 'Password: ', '', ''));
say '';
}
do {
my $from = $remote->clone;
$from->password(undef);
say "SRC: ", $from;
};
my @path = split /\//, $remote->path;
example/fget.pl view on Meta::CPAN
say sprintf "SERVER: [ %d ] %s", $res->code, $_ for @{ $res->message };
}
});
$ftp->connect($remote->host, $remote->port)->recv;
$ftp->login($remote->user, $remote->password)->recv;
$ftp->type('I')->recv;
$ftp->cwd(join '/', '', @path)->recv;
my $remote_size;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/Feed.pm view on Meta::CPAN
hash reference, just like you would pass it to the C<headers> argument of
the C<http_get> request of L<AnyEvent::HTTP>.
=item username => $http_user
=item password => $http_pass
These are the HTTP username and password that will be used for Basic HTTP
Authentication with the HTTP server when fetching the feed. This is mostly
sugar for you so you don't have to encode them yourself and pass them to the
C<headers> argument above.
=item on_fetch => $cb->($feed_reader, $new_entries, $feed_obj, $error)
lib/AnyEvent/Feed.pm view on Meta::CPAN
if (defined $self->{last_mod}) {
$hdrs{'If-Modified-Since'} = $self->{last_mod};
}
$hdrs{Authorization} =
"Basic " . encode_base64 (join ':', $self->{username}, $self->{password}, '')
if defined $self->{username};
\%hdrs
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/FreeSWITCH.pm view on Meta::CPAN
my $class = ref($this) || $this;
my $self = bless(\%args, $class);
$self->{host} ||= '127.0.0.1';
$self->{port} ||= '8021';
$self->{password} ||= 'ClueCon';
$self->{events} ||= 'all';
return $self;
}
lib/AnyEvent/FreeSWITCH.pm view on Meta::CPAN
my $self = shift;
$self->{esl} = new ESL::ESLconnection(
$self->{host},
$self->{port},
$self->{password},
);
if ( $self->is_connected() ) {
$self->event('connected');
$self->{io} = AnyEvent->io(
fh => $self->{esl}->socketDescriptor(),
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/Gmail/Feed.pm view on Meta::CPAN
sub new {
my ($class, %args) = @_;
my $username = delete $args{username};
my $password = delete $args{password};
my $label = delete $args{label};
my $interval = delete $args{interval} || 60;
unless ($username && $password) {
die "both username and password are required";
}
my $self = bless {}, $class;
my $auth = MIME::Base64::encode( join(":", $username, $password) );
my $headers = {Authorization => "Basic $auth"};
my $uri = 'https://mail.google.com/mail/feed/atom/';
$uri .= $label . '/' if $label; ## 'unread' or whatever
my %seen;
lib/AnyEvent/Gmail/Feed.pm view on Meta::CPAN
use AnyEvent;
use AnyEvent::Gmail::Feed;
AnyEvent::Gmail::Feed->new(
username => $user, #required
password => $pass, #required
label => $label, #optional (eg. 'unread')
interval => $interval, #optional (60s by default)
on_new_entry => sub {
my $entry = shift; #XML::Atom::Entry instance
use Data::Dumper; warn Dumper $entry->as_xml;
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/AnyEvent/HTTP/Socks.pm view on Meta::CPAN
This module uses IO::Socket::Socks as socks library, so any global variables like
$IO::Socket::Socks::SOCKS_DEBUG can be used to change the behavior.
Socks string structure is:
scheme://login:password@host:port
^^^^^^ ^^^^^^^^^^^^^^ ^^^^ ^^^^
1 2 3 4
1 - scheme can be one of the: socks4, socks4a, socks5
2 - "login:password@" part can be ommited if no authorization for socks proxy needed. For socks4
proxy "password" should be ommited, because this proxy type doesn't support login/password authentication,
login will be interpreted as userid.
3 - ip or hostname of the proxy server
4 - port of the proxy server
view all matches for this distribution
view release on metacpan or search on metacpan
TODO: provide lwp_request function that takes an lwp http requets and returns a http response.
TODO: set_proxy hook
TODO: use proxy hook
TODO: on_upgrade, for 101 responses?
TODO: document session vs. sessionid correctly.
TODO: support proxy username:password in both proxy switch and set_proxy string (dzagashev@gmail.com)
TODO: remove "unexpectedly got a destructed handle"
TODO: maybe read big chunks in smaller portions for chunked-encoding + on_body.
TODO: callback as body (Kostirya)
TODO: infinite recursion(?) (Kostirya)
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
t/lib/RPC/ExtDirect/Test/Util/AnyEvent.pm view on Meta::CPAN
my $output = $test->{output};
next TEST if @run_only && !grep { lc $name eq lc $_ } @run_only;
local $RPC::ExtDirect::Test::Pkg::PollProvider::WHAT_YOURE_HAVING
= $config->{password};
my $url = $input->{anyevent_url} || $input->{url};
my $method = $input->{method};
my $input_content = $input->{anyevent_content} || $input->{content}
|| { type => 'raw_get', arg => [$url] };
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/IMAP.pm view on Meta::CPAN
use AnyEvent::IMAP;
my $imap = AnyEvent::IMAP->new(
host => 'server',
user => "USERID",
pass => 'password',
port => 993,
ssl => 1,
);
$imap->reg_cb(
connect => sub {
view all matches for this distribution
view release on metacpan or search on metacpan
examples/twitter.pl view on Meta::CPAN
use Config::Pit;
use opts;
my $conf = pit_get('twitter.com', require => {
"username" => "your username on twitter",
"password" => "your password on twitter",
});
opts my $port => 'Int';
my $ircd = AnyEvent::IRC::Server->new(
examples/twitter.pl view on Meta::CPAN
);
$ircd->run();
my $streamer = AnyEvent::Twitter::Stream->new(
username => $conf->{username},
password => $conf->{password},
method => 'filter',
track => 'http',
on_tweet => sub {
my $tweet = shift;
$ircd->daemon_cmd_privmsg(
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/IRC/Client.pm view on Meta::CPAN
The keys of the hash reference you can pass in C<$info> are:
nick - the nickname you want to register as
user - your username
real - your realname
password - the server password
timeout - the TCP connect timeout
All keys, except C<nick> are optional.
=cut
lib/AnyEvent/IRC/Client.pm view on Meta::CPAN
ext_before_connect => sub {
my ($self, $err) = @_;
unless ($err) {
$self->register (
$info->{nick}, $info->{user}, $info->{real}, $info->{password}
);
}
delete $self->{register_cb_guard};
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/InfluxDB.pm view on Meta::CPAN
use JSON qw(decode_json);
use List::MoreUtils qw(zip);
use URI::Encode::XS qw( uri_encode );
use Moo;
has [qw( ssl_options username password jwt on_request )] => (
is => 'ro',
predicate => 1,
);
has 'server' => (
lib/AnyEvent/InfluxDB.pm view on Meta::CPAN
sub _build__server_uri {
my ($self) = @_;
my $url = URI->new( $self->server, 'http' );
if ( $self->has_username && $self->has_password ) {
$url->query_param( 'u' => $self->username );
$url->query_param( 'p' => $self->password );
}
return $url;
}
lib/AnyEvent/InfluxDB.pm view on Meta::CPAN
my $q;
if ( exists $args{q} ) {
$q = $args{q};
} else {
$q = 'CREATE USER '. $args{username}
.' WITH PASSWORD \''. $args{password} .'\'';
$q .= ' WITH ALL PRIVILEGES' if $args{all_privileges};
}
my $url = $self->_make_url('/query', {
lib/AnyEvent/InfluxDB.pm view on Meta::CPAN
}
);
}
sub set_user_password {
my ($self, %args) = @_;
my $q;
if ( exists $args{q} ) {
$q = $args{q};
} else {
$q = 'SET PASSWORD FOR '. $args{username}
.' = \''. $args{password} .'\'';
}
my $url = $self->_make_url('/query', {
q => $q
});
lib/AnyEvent/InfluxDB.pm view on Meta::CPAN
use Monitoring::Plugin::Performance;
my $db = AnyEvent::InfluxDB->new(
server => 'http://localhost:8086',
username => 'admin',
password => 'password',
);
my $hdl;
tcp_server undef, 8888, sub {
my ($fh, $host, $port) = @_;
lib/AnyEvent/InfluxDB.pm view on Meta::CPAN
my $db = AnyEvent::InfluxDB->new(
server => 'http://localhost:8086',
# authenticate using Basic credentials
username => 'admin',
password => 'password',
# or use JWT token
jwt => 'JWT_TOKEN_BLOB'
);
Returns object representing given InfluDB C<server> connected using optionally
provided username C<username> and password C<password>.
Default value of C<server> is C<http://localhost:8086>.
If the server protocol is C<https> then by default no validation of remote
host certificate is performed. This can be changed by setting C<ssl_options>
lib/AnyEvent/InfluxDB.pm view on Meta::CPAN
print "$method $url\n";
print "$post_data\n" if $post_data;
}
);
=for Pod::Coverage has_jwt jwt has_on_request has_password has_ssl_options has_username on_request password server ssl_options username
=head2 ping
$cv = AE::cv;
$db->ping(
lib/AnyEvent/InfluxDB.pm view on Meta::CPAN
=head3 create_user
$cv = AE::cv;
$db->create_user(
# raw query
q => "CREATE USER jdoe WITH PASSWORD 'mypassword' WITH ALL PRIVILEGES",
# or query created from arguments
username => 'jdoe',
password => 'mypassword',
all_privileges => 1,
# callbacks
on_success => $cv,
on_error => sub {
$cv->croak("Failed to create user: @_");
}
);
$cv->recv;
Creates user with C<username> and C<password>. If flag C<all_privileges> is set
to true created user will be granted cluster administration privileges.
Note: C<password> will be automatically enclosed in single quotes.
The required C<on_success> code reference is executed if request was successful,
otherwise executes the required C<on_error> code reference.
=head3 set_user_password
$cv = AE::cv;
$db->set_user_password(
# raw query
q => "SET PASSWORD FOR jdoe = 'otherpassword'",
# or query created from arguments
username => 'jdoe',
password => 'otherpassword',
# callbacks
on_success => $cv,
on_error => sub {
$cv->croak("Failed to set password: @_");
}
);
$cv->recv;
Sets password to C<password> for the user identified by C<username>.
Note: C<password> will be automatically enclosed in single quotes.
The required C<on_success> code reference is executed if request was successful,
otherwise executes the required C<on_error> code reference.
=head3 show_users
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/JSONRPC/HTTP/Client.pm view on Meta::CPAN
is => "rw",
isa => 'Str',
predicate => "has_username"
);
has password => (
is => "rw",
isa => "Str"
);
has _request_pool => (
lib/AnyEvent/JSONRPC/HTTP/Client.pm view on Meta::CPAN
sub _authorization_header {
my $self = shift;
return unless $self->has_username;
return Authorization => "Basic " . encode_base64( $self->username . ":" . $self->password );
}
sub _handle_response {
my ($self, $json, $header) = @_;
lib/AnyEvent/JSONRPC/HTTP/Client.pm view on Meta::CPAN
use AnyEvent::JSONRPC::HTTP::Client;
my $client = AnyEvent::JSONRPC::HTTP::Client->new(
url => 'http://rpc.example.net/issues',
username => "pmakholm",
password => "secret",
);
# blocking interface
my $res = $client->call( echo => 'foo bar' )->recv; # => 'foo bar';
lib/AnyEvent/JSONRPC/HTTP/Client.pm view on Meta::CPAN
Username to use for authorization (Optional).
If this is set an Authorization header containing basic auth credential is
always sent with request.
=item password => 'Str'
Password used for authorization (optional)
=back
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/KVStore/Etcd.pm view on Meta::CPAN
=cut
has user => (is => 'ro', isa => Str);
=head2 password Str
Password for authentication.
=cut
has password => (is => 'ro', isa => Str);
=head2 cnx Net::Etcd
This is the active connection to the etcd database.
lib/AnyEvent/KVStore/Etcd.pm view on Meta::CPAN
sub _etcd_connect {
my $self = shift;
my $cnx = Net::Etcd->new($self->_slice('host', 'port', 'ssl'));
die 'Could not create new etcd connection' unless $cnx;
$cnx->auth($self->_slice('user', 'password'))->authenticate if $self->user;
return $cnx;
}
has cnx => (is => 'ro', builder => '_etcd_connect', lazy => 1);
view all matches for this distribution
view release on metacpan or search on metacpan
eg/lingr-stream.pl view on Meta::CPAN
use Config::Pit;
my $conf = pit_get 'lingr.com', require => {
'user' => 'lingr username',
'password' => 'lingr password',
'api_key' => 'lingr api_key (optional)',
};
my $cv = AE::cv;
view all matches for this distribution
view release on metacpan or search on metacpan
MP/Transport.pm view on Meta::CPAN
=item the acceptable authentication methods
A comma-separated list of authentication methods supported by the
node. Note that AnyEvent::MP supports a C<hex_secret> authentication
method that accepts a clear-text password (hex-encoded), but will not use
this authentication method itself.
The receiving side should choose the first authentication method it
supports.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/MQTT.pm view on Meta::CPAN
wait => 'nothing',
keep_alive_timer => 120,
qos => MQTT_QOS_AT_MOST_ONCE,
message_id => 1,
user_name => undef,
password => undef,
tls => undef,
will_topic => undef,
will_qos => MQTT_QOS_AT_MOST_ONCE,
will_retain => 0,
will_message => '',
lib/AnyEvent/MQTT.pm view on Meta::CPAN
will_topic => $weak_self->{will_topic},
will_qos => $weak_self->{will_qos},
will_retain => $weak_self->{will_retain},
will_message => $weak_self->{will_message},
user_name => $weak_self->{user_name},
password => $weak_self->{password},
);
$weak_self->_write_now($msg);
$handle->timeout($weak_self->{timeout});
$weak_self->{wait} = 'connack';
$handle->on_read(subname 'on_read_cb' => sub {
lib/AnyEvent/MQTT.pm view on Meta::CPAN
=item C<user_name>
The user name for the MQTT broker.
=item C<password>
The password for the MQTT broker.
=item C<tls>
Set flag to enable TLS encryption, Default is no encryption.
view all matches for this distribution
view release on metacpan or search on metacpan
examples/client.pl view on Meta::CPAN
$|++;
$AnyEvent::MSN::DEBUG++;
my ($user, $pass) = @ARGV; # XXX - Better to use a GetOpt-like module
my $cv = AnyEvent->condvar;
($user, $pass) = ('anyevent_msn@hotmail.com', 'public');
($user, $pass) = ('msn@penilecolada.com', 'password');
my $reconnect_timer;
#
my $msn = AnyEvent::MSN->new(
passport => $user, # XXX - I may change the name of this arg before pause
password => $pass,
# Extra user info
status => 'AWY',
friendlyname => 'Just another MSN hacker,',
personalmessage => 'This can\'t be life!',
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/TLS.pm view on Meta::CPAN
The idea behind being able to specify a string is to avoid blocking in
I/O. Unfortunately, Net::SSLeay fails to implement any interface to the
needed OpenSSL functionality, this is currently implemented by writing to
a temporary file.
=item cert_password => $string | $callback->($tls)
The certificate password - if the certificate is password-protected, then
you can specify its password here.
Instead of providing a password directly (which is not so recommended),
you can also provide a password-query callback. The callback will be
called whenever a password is required to decode a local certificate, and
is supposed to return the password.
=item dh_file => $path
Path to a file containing Diffie-Hellman parameters in PEM format, for
use in servers. See also C<dh> on how to specify them directly, or use a
lib/AnyEvent/TLS.pm view on Meta::CPAN
if length $ENV{PERL_ANYEVENT_TLS_DEBUG};
$self->{debug} = $arg{debug}
if exists $arg{debug};
my $pw = $arg{cert_password};
Net::SSLeay::CTX_set_default_passwd_cb ($ctx, ref $pw ? $pw : sub { $pw });
if ($self->{verify_mode}) {
if (exists $arg{ca_file} or exists $arg{ca_path} or exists $arg{ca_cert}) {
# either specified: use them
view all matches for this distribution