view release on metacpan or search on metacpan
lib/App/Greple/PwBlock.pm view on Meta::CPAN
# Create a new PwBlock object
my $pb = App::Greple::PwBlock->new($text);
# Access parsed information
my $id = $pb->id('0'); # Get ID by label
my $pw = $pb->pw('a'); # Get password by label
my $cell = $pb->cell('A', 0); # Get matrix cell value
# Configuration
use App::Greple::PwBlock qw(config);
config('id_keys', 'LOGIN EMAIL USER ACCOUNT');
config('pw_blackout', 0);
=head1 DESCRIPTION
B<App::Greple::PwBlock> is a specialized parser for extracting and managing
password and ID information from text blocks. It provides intelligent
pattern recognition for common credential formats and includes support
for random number matrices used by banking systems.
The module uses L<Getopt::EX::Config> for centralized parameter management,
allowing configuration of parsing behavior, display colors, and keyword
lib/App/Greple/PwBlock.pm view on Meta::CPAN
my $pb = App::Greple::PwBlock->new($credential_text);
=item B<parse>(I<text>)
Parses the given text to extract ID, password, and matrix information.
This method is called automatically by B<new> if text is provided.
$pb->parse($text);
=item B<id>(I<label>)
lib/App/Greple/PwBlock.pm view on Meta::CPAN
my $username = $pb->id('0');
=item B<pw>(I<label>)
Returns the password value associated with the given label. Labels are
assigned automatically during parsing (e.g., 'a', 'b', 'c', ...).
my $password = $pb->pw('a');
=item B<cell>(I<column>, I<row>)
Returns the value from a matrix cell at the specified column and row.
Useful for banking security matrices.
my $value = $pb->cell('E', 3); # Column E, Row 3
=item B<any>(I<label>)
Returns any value (ID, password, or matrix cell) associated with the label.
This is a convenient method that checks all types.
my $value = $pb->any('a');
=item B<orig>()
Returns the original unparsed text.
=item B<masked>()
Returns the text with passwords masked according to the B<pw_blackout> setting.
=item B<matrix>()
Returns a hash reference containing the parsed matrix data.
lib/App/Greple/PwBlock.pm view on Meta::CPAN
Enable or disable ID field parsing.
=item B<parse_pw> (boolean, default: 1)
Enable or disable password field parsing.
=item B<id_keys> (string, default: "ID ACCOUNT USER CODE NUMBER URL ã¦ã¼ã¶ ã¢ã«ã¦ã³ã ã³ã¼ã çªå·")
Space-separated list of keywords that identify ID fields.
lib/App/Greple/PwBlock.pm view on Meta::CPAN
Color specification for ID labels in output.
=item B<pw_keys> (string, default: "PASS PIN ãã¹ æè¨¼")
Space-separated list of keywords that identify password fields.
=item B<pw_chars> (string, default: "\S")
Regular expression character class for valid password characters.
=item B<pw_color> (string, default: "K/545")
Color specification for password values in output.
=item B<pw_label_color> (string, default: "S;M/555")
Color specification for password labels in output.
=item B<pw_blackout> (boolean, default: 1)
When enabled, passwords are masked in the output for security.
=back
=head2 Configuration Examples
# Customize ID keywords
config('id_keys', 'LOGIN EMAIL USERNAME ACCOUNT');
# Disable password masking
config('pw_blackout', 0);
# Add custom password keywords
config('pw_keys', 'PASS PASSWORD PIN SECRET TOKEN');
=head1 MATRIX SUPPORT
The module can automatically detect and parse random number matrices
view all matches for this distribution
view release on metacpan or search on metacpan
share/jtca-katakana-guide-3.pl view on Meta::CPAN
ãã«ã valve ï¼
ãã¼ bar ï¼ï¼ï¼
ãã¼ã¸ã§ã³ version ï¼ï¼ï¼ãï¼
ãã¼ã¸ã³ virgin ï¼
ãã¼ãã£ã«ã« vertical ï¼ï¼ï¼ãï¼ï¼ï¼ãï¼ãï¼ï¼ï¼ä¾å¤
ãã¹ã¯ã¼ã password ï¼ï¼ï¼
ããã«ã¹ papyrus ï¼ï¼ï¼ä¾å¤
ããã©ã¼ãã³ã¹ performance ï¼ï¼ï¼ãï¼ï¼ï¼
ãã©ã¡ã¼ã¿ã¼ parameter ï¼ï¼ï¼ãï¼ï¼ï¼
ãã¼ã¹ perth ï¼ï¼ï¼
ãã¼ã¹ãã¯ãã£ã perspective ï¼ï¼ï¼ãï¼ãï¼ï¼ï¼ä¾å¤
view all matches for this distribution
view release on metacpan or search on metacpan
DESCRIPTION
groupsecret is a program that makes it easy for groups to share a
secret between themselves without exposing the secret to anyone else.
It could be used, for example, by a team to share an ansible-vault(1)
password; see "ansible-vault" for more about this particular use case.
The goal of this program is to be easy to use and have few dependencies
(or only have dependencies users are likely to already have installed).
groupsecret works by encrypting a secret with a symmetric cipher
ansible-vault
Ansible Vault <http://docs.ansible.com/ansible/latest/vault.html> is a
great way to securely store secret configuration variables for use in
your playbooks. Vaults are secured using a password, which is okay if
you're the only one who will need to unlock the Vault, but as soon as
you add team members who also need to access the Vault you are then
faced with how to manage knowledge of the password. When a team member
leaves, you'll also need to change the Vault password which means
you'll need a way to communicate the change to other team members who
also have access. This becomes a burden to manage.
You can use groupsecret to manage this very easily by storing the Vault
password in a groupsecret keyfile. That way, you can add or remove keys
and change the secret (the Vault password) at any time without
affecting the team members that still have access. Team members always
use their own SSH2 RSA keys to unlock the Vault, so no new password
ever needs to be communicated out.
To set this up, first create a keyfile with the public keys of everyone
on your team:
groupsecret -f vault-password.yml add-keys keys/*_rsa.pub
Then set the secret in the keyfile to a long random number:
groupsecret -f vault-password.yml set-secret rand:48
This will be the Ansible Vault password. You can see it if you want
using the "print-secret" command, but you don't need to.
Then we'll take advantage of the fact that an Ansible Vault password
file can be an executable program that prints the Vault password to
STDOUT. Create a file named vault-password with the following script,
and make it executable (chmod +x vault-password):
#!/bin/sh
# Use groupsecret <https://github.com/chazmcgarvey/groupsecret> to access the Vault password
exec ${GROUPSECRET:-groupsecret} -f vault-password.yml print-secret
Commit both vault-password and vault-password.yml to your repository.
Now use ansible-vault(1) to add files to the Vault:
ansible-vault --vault-id=vault-password encrypt foo.yml bar.yml baz.yml
These examples show the Ansible 2.4+ syntax, but it can be adapted for
earlier versions. The significant part of this command is
--vault-id=vault-password which refers to the executable script we
created earlier. You can use that argument with other ansible-vault
commands to view or edit the encrypted files.
You can also pass that same argument to ansible-playbook(1) in order to
use the Vault in playbooks that refer to the encrypted variables:
ansible-playbook -i myinventory --vault-id=vault-password site.yml
What this does is execute vault-password which executes groupsecret to
print the secret contained in the vault-password.yml file (which is
actually the Vault password) to STDOUT. In order to do this,
groupsecret will decrypt the keyfile passphrase using any one of the
private keys that have associated public keys added to the keyfile.
That's it! Pretty easy.
If and when you need to change the Vault password (such as when a team
member leaves), you can follow this procedure which is probably mostly
self-explanatory:
groupsecret -f vault-password.yml delete-key keys/revoked/jdoe_rsa.pub
groupsecret -f vault-password.yml print-secret >old-vault-password.txt
groupsecret -f vault-password.yml set-secret rand:48
echo "New Vault password: $(groupsecret -f vault-password.yml)"
ansible-vault --vault-id=old-vault-password.txt rekey foo.yml bar.yml baz.yml
# You will be prompted for the new Vault password which you can copy from the output above.
rm -f old-vault-password.txt
This removes access to the keyfile secret and to the Ansible Vault.
Don't forget that you may also want to change the variables being
protected by the Vault. After all, those secrets are the actual things
we're protecting by doing all of this, and an exiting team member may
view all matches for this distribution
view release on metacpan or search on metacpan
share/static/jquery-1.4.2.js view on Meta::CPAN
});
jQuery.event.add(this, "keypress.specialSubmit", function( e ) {
var elem = e.target, type = elem.type;
if ( (type === "text" || type === "password") && jQuery( elem ).closest("form").length && e.keyCode === 13 ) {
return trigger( "submit", this, arguments );
}
});
} else {
share/static/jquery-1.4.2.js view on Meta::CPAN
return "checkbox" === elem.type;
},
file: function(elem){
return "file" === elem.type;
},
password: function(elem){
return "password" === elem.type;
},
submit: function(elem){
return "submit" === elem.type;
},
image: function(elem){
share/static/jquery-1.4.2.js view on Meta::CPAN
};
}
var jsc = now(),
rscript = /<script(.|\s)*?\/script>/gi,
rselectTextarea = /select|textarea/i,
rinput = /color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,
jsre = /=\?(&|$)/,
rquery = /\?/,
rts = /(\?|&)_=.*?(&|$)/,
rurl = /^(\w+:)?\/\/([^\/?#]+)/,
r20 = /%20/g,
share/static/jquery-1.4.2.js view on Meta::CPAN
async: true,
/*
timeout: 0,
data: null,
username: null,
password: null,
traditional: false,
*/
// Create the request object; Microsoft failed to properly
// implement the XMLHttpRequest in IE7 (can't request local files),
// so we use the ActiveXObject when it is available
share/static/jquery-1.4.2.js view on Meta::CPAN
}
// Open the socket
// Passing null username, generates a login popup on Opera (#2865)
if ( s.username ) {
xhr.open(type, s.url, s.async, s.username, s.password);
} else {
xhr.open(type, s.url, s.async);
}
// Need an extra try/catch for cross domain requests in Firefox 3
view all matches for this distribution
view release on metacpan or search on metacpan
t/in/objects.cache view on Meta::CPAN
command_name check_ssh_4
command_line /usr/lib/nagios/plugins/check_ssh -4 '$HOSTADDRESS$'
}
define command {
command_name check_ssh_no_password_login
command_line /usr/local/lib/nagios/plugins/check_ssh_no_password_login -H '$HOSTADDRESS$'
}
define command {
command_name check_ssh_port
command_line /usr/lib/nagios/plugins/check_ssh -p '$ARG1$' '$HOSTADDRESS$'
t/in/objects.cache view on Meta::CPAN
retain_nonstatus_information 1
}
define service {
host_name aneurysm
service_description SSH password login disabled
check_period 24x7
check_command check_ssh_no_password_login
contact_groups admins
notification_period 24x7
initial_state o
check_interval 15.000000
retry_interval 1.000000
t/in/objects.cache view on Meta::CPAN
retain_nonstatus_information 1
}
define service {
host_name steel.derf0.net
service_description SSH password login disabled
check_period 24x7
check_command check_ssh_no_password_login
contact_groups admins
notification_period 24x7
initial_state o
check_interval 15.000000
retry_interval 1.000000
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Ikachan.pm view on Meta::CPAN
irc server port.
=item -K, --Keyword
irc server password
=item -N, --Nickname
irc nickname
view all matches for this distribution
view release on metacpan or search on metacpan
script/downsize-image view on Meta::CPAN
[profile=production]
username=bar
pass=honey
When you specify C<--config-profile=dev>, C<username> will be set to C<foo> and
C<password> to C<beaver>. When you specify C<--config-profile=production>,
C<username> will be set to C<bar> and C<password> to C<honey>.
=item B<--no-config>, B<-C>
Do not use any configuration file.
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/App/JC/Client.pm view on Meta::CPAN
In this case the config file is written in yaml.
---
url: https://jirahost/jira/
user: yourusername
pass: yourpassword
default:
tasktype: Aufgabe
Please make sure the config file is only readable by your user because a password is saved within it.
=head1 AUTHOR
Dominik Meyer <dmeyer@federationhq.de>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/JESP.pm view on Meta::CPAN
# Settings
## DB Connection attrbutes.
has 'dsn' => ( is => 'ro', isa => 'Str', required => 1 );
has 'username' => ( is => 'ro', isa => 'Maybe[Str]', required => 1);
has 'password' => ( is => 'ro', isa => 'Maybe[Str]', required => 1);
has 'home' => ( is => 'ro', isa => 'Str', required => 1 );
## JESP Attributes
has 'prefix' => ( is => 'ro', isa => 'Str', default => 'jesp_' );
has 'driver_class' => ( is => 'ro', isa => 'Str', lazy_build => 1);
# Operational stuff
has 'get_dbh' => ( is => 'ro', isa => 'CodeRef', default => sub{
my ($self) = @_;
return sub{
return DBI->connect( $self->dsn(), $self->username(), $self->password(),
{ RaiseError => 1,
PrintError => 0,
AutoCommit => 1,
});
};
lib/App/JESP.pm view on Meta::CPAN
my $jesp = App::JESP->new({
interactive => 0, # No ANSI color
home => 'path/to/jesphome',
dsn => ...,
username => ...,
password => ...
});
$jesp->install();
$jesp->deploy();
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/JIRAPrint.pm view on Meta::CPAN
# Operation properties
has 'url' => ( is => 'ro', isa => 'Str', lazy_build => 1 );
has 'username' => ( is => 'ro', isa => 'Str' , lazy_build => 1);
has 'password' => ( is => 'ro', isa => 'Str' , lazy_build => 1);
has 'project' => ( is => 'ro', isa => 'Str' , lazy_build => 1 );
has 'sprint' => ( is => 'ro', isa => 'Str' , lazy_build => 1 );
has 'maxissues' => ( is => 'ro', isa => 'Int' , lazy_build => 1);
lib/App/JIRAPrint.pm view on Meta::CPAN
has 'tt' => ( is => 'ro', isa => 'Template', lazy_build => 1);
sub _build_jira{
my ($self) = @_;
$log->info("Accessing JIRA At ".$self->url()." as '".$self->username()."' (+password)");
return JIRA::REST->new( $self->url() , $self->username() , $self->password() );
}
sub _build_fields{
my ($self) = @_;
return $self->config()->{fields} // [ qw/key status summary assignee issuetype/ ];
lib/App/JIRAPrint.pm view on Meta::CPAN
sub _build_username{
my ($self) = @_;
return $self->config()->{username} // die "Missing username ".$self->config_place()."\n";
}
sub _build_password{
my ($self) = @_;
return $self->config()->{password} // die "Missing password ".$self->config_place()."\n";
}
sub _build_project{
my ($self) = @_;
return $self->config()->{project} // die "Missing project ".$self->config_place()."\n";
lib/App/JIRAPrint.pm view on Meta::CPAN
return $output;
}
=head2 fetch_fields
Returns the list of available fiels at this (url, username, password, project)
Usage:
my $fields = $this->fetch_fields();
lib/App/JIRAPrint.pm view on Meta::CPAN
return $self->jira->GET('/field');
}
=head2 fetch_issues
Fetches issues from JIRA Using this object properties (url, username, password, project, maxissues, fields)
Usage:
my $issues = $this->fetch_issues();
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/JenkinsCli.pm view on Meta::CPAN
The username to access jenkins by
=item api_pass
The password to access jenkins by
=item test
Flag to not actually perform changes
view all matches for this distribution
view release on metacpan or search on metacpan
script/move-windows-to-kde-activity view on Meta::CPAN
[profile=production]
username=bar
pass=honey
When you specify C<--config-profile=dev>, C<username> will be set to C<foo> and
C<password> to C<beaver>. When you specify C<--config-profile=production>,
C<username> will be set to C<bar> and C<password> to C<honey>.
=item B<--no-config>, B<-C>
Do not use any configuration file.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/KGB/API.pm view on Meta::CPAN
the hash is the hexadecimal representation of the SHA-1 hash calculated over
the following data:
=over
=item Project password
This is the shared password known to the client and the server.
=item project-name
=item request-text
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/KeePass2.pm view on Meta::CPAN
}
);
$self->_fkp->unlock if $self->_fkp->is_locked;
my $master = $self->_get_master_key;
my $confirm = $self->_get_confirm_key;
croak "Your master password is different from the confirm password !"
if $master ne $confirm;
$self->_fkp->save_db( $self->file, $master );
return;
}
lib/App/KeePass2.pm view on Meta::CPAN
=head1 ATTRIBUTES
=head2 file
The password file
=head2 create
Create the keepass2 file
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Koyomi/DataSource/Job/Teng.pm view on Meta::CPAN
my $connector
= $ctx->config->{datasource}{connector}{job}
// $ctx->config->{datasource}{connector};
my $teng = App::Koyomi::DataSource::Job::Teng::Object->new(
connect_info => [
$connector->{dsn}, $connector->{user}, $connector->{password},
+{ RaiseError => 1, PrintError => 0, AutoCommit => 1 },
],
schema => App::Koyomi::DataSource::Job::Teng::Schema->instance,
);
my %obj = (teng => $teng);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/LDAP/Command/Add/User.pm view on Meta::CPAN
);
my $user = App::LDAP::LDIF::User->new(
base => $self->base // config()->{nss_base_passwd}->[0],
uid => $username,
userPassword => encrypt(new_password()),
uidNumber => $uid->get_value("uidNumber"),
gidNumber => $self->gid_of( $self->group ),
sn => $self->surname,
mail => $self->mail,
);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/LLEvalBot/CLI.pm view on Meta::CPAN
);
$parser->getoptionsfromarray(\@argv, \my %opt, qw/
host=s
port=s
password=s
channels=s@
nickname=s
enable-ssl
/) or pod2usage(1);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/LXC/Container/Run.pm view on Meta::CPAN
my $re_ids = $self->{user};
# TODO: Should we distinguish UIDs/GIDs? For now we just simply
# add them all. This has the charm that files of other users
# within the same group will be visible with their names in
# directory listings. The disadvantage is making them known by
# name (but the password hashes are always safe):
foreach (@{$self->{uids}}, @{$self->{gids}})
{ $re_ids .= '|' . $_; }
foreach (ACCOUNT_FILES)
{
# remove first to be sure not to overwrite something linked:
lib/App/LXC/Container/Run.pm view on Meta::CPAN
open my $out, '>', $lxc_etc . $_
or fatal 'can_t_open__1__2', $lxc_etc . $_, $!;
while (<$in>)
{
next unless m/(?:^|[:,])(?:$re_ids|root)(?:[:,]|$)/;
# If applicable, remove the encrypted password, as it's
# not needed inside of the container:
s/^([^:]+):([^!:*][^:*][^:]+):/$1:!:/;
print $out $_;
}
close $out;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Lazyd.pm view on Meta::CPAN
use URI::Title qw( title );
sub run {
my (undef, $config, $url, @tags) = @_;
die "Need to set both username and password."
unless defined($config->{username}) && defined($config->{password});
die "You should give me an URL, dude.\n"
unless defined $url;
my $del = Net::Delicious->new({
user => $config->{username},
pswd => $config->{password}
});
my $title = title($url) || "";
$del->add_post({
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/LedgerSMB/Admin.pm view on Meta::CPAN
--path13 /example/path Path to LedgerSMB 1.3 installation
--path14 /example/path2 Path to LedgerSMB 1.4 installation
--port 5432 Database Poart
--dbname database Reload the specified db, overridden by --all
--username postgres Database Superuser to Log In As
--prompt-password Prompt for Password (can use PGPASSWORD instead)
=head2 lsmb_createdb
Due to improper errors, this currently does not work properly with LedgerSMB
lib/App/LedgerSMB/Admin.pm view on Meta::CPAN
--chart us/chart/General Chart of Accounts path (relative to sql)
--gifi ca/gifi/General Path to GIFI
--port 5432 Database Poart
--dbname database Create db with the following name (required)
--username postgres Database Superuser to Log In As
--prompt-password Prompt for Password (can use PGPASSWORD instead)
=head1 Bundled Libraries
=head2 App::LedgerSMB::Admin
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
script/lint-prereqs view on Meta::CPAN
[profile=production]
username=bar
pass=honey
When you specify C<--config-profile=dev>, C<username> will be set to C<foo> and
C<password> to C<beaver>. When you specify C<--config-profile=production>,
C<username> will be set to C<bar> and C<password> to C<honey>.
=item B<--no-config>, B<-C>
Do not use any configuration file.
view all matches for this distribution
view release on metacpan or search on metacpan
script/list-software-licenses view on Meta::CPAN
[profile=production]
username=bar
pass=honey
When you specify C<--config-profile=dev>, C<username> will be set to C<foo> and
C<password> to C<beaver>. When you specify C<--config-profile=production>,
C<username> will be set to C<bar> and C<password> to C<honey>.
=item B<--no-config>, B<-C>
Do not use any configuration file.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/MBUtiny/Collector.pm view on Meta::CPAN
use Carp;
use CTK::ConfGenUtil;
use CTK::TFVals qw/ :ALL /;
use App::MBUtiny::Collector::DBI;
use App::MBUtiny::Collector::Client;
use App::MBUtiny::Util qw/hide_password/;
use constant {
COLLECTOR_TYPES => {
internal => 0,
external => 1,
lib/App/MBUtiny/Collector.pm view on Meta::CPAN
sub check {
my $self = shift;
$self->error("");
my $dbi = $self->dbi;
return "" unless $self->collectors;
my @ret = (); # List of DSN/URL_wo_password
foreach my $collector ($self->collectors) {
my $type = $collector->{type};
if ($type eq 'internal') { # Internal
if ($dbi->error) {
$self->error($dbi->error());
lib/App/MBUtiny/Collector.pm view on Meta::CPAN
my $check = $client->check;
unless ($client->status) {
$self->error(join("\n", $client->transaction, $client->error));
next;
}
push @ret, hide_password($url);
}
}
return @ret ? join("\n", @ret) : "";
}
sub fixup {
my $self = shift;
my %args = @_;
$self->error("");
my $dbi = $self->dbi;
return "" unless $self->collectors;
my @ret = (); # List of DSN/URL_wo_password
foreach my $collector ($self->collectors) {
my $type = $collector->{type};
my $url = $collector->{url} || "";
my $timeout = $collector->{timeout} || 0;
lib/App/MBUtiny/Collector.pm view on Meta::CPAN
file => $args{file},
) or do {
$self->error(join("\n", $client->transaction, $client->error));
next;
};
push @ret, hide_password($url);
}
} else { # Put (op)
if ($type eq 'internal') { # Internal
$dbi->add(
type => _type2int($type),
lib/App/MBUtiny/Collector.pm view on Meta::CPAN
comment => $comment,
) or do {
$self->error(join("\n", $client->transaction, $client->error));
next;
};
push @ret, hide_password($url);
}
}
}
return @ret ? join("\n", @ret) : "";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/MFILE/WWW/Dispatch.pm view on Meta::CPAN
$log->debug( "Entering " . __PACKAGE__ . "::validate_user_credentials()" );
my $r = $self->request;
my $session = $r->{'env'}->{'psgix.session'};
my $nick = $body->{'nam'};
my $password = $body->{'pwd'};
my $standalone = $meta->META_WWW_STANDALONE_MODE;
$log->debug( "Employee $nick login attempt" );
my ( $code, $message, $body_json );
lib/App/MFILE/WWW/Dispatch.pm view on Meta::CPAN
my $db = $site->MFILE_WWW_STANDALONE_CREDENTIALS_DATABASE;
$code = 401;
$message = 'Unauthorized';
for my $entry (@$db) {
if ( $nick eq $entry->{'nam'} ) {
if ( $password eq $entry->{'pwd'} ) {
$code = 200;
$message = 'OK';
$body_json = { payload =>
{
emp => { nick => $nick, eid => $entry->{'eid'} },
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/MFILE/HTTP.pm view on Meta::CPAN
Optionally takes PARAMHASH:
server => [URI OF REST SERVER] default is 'http://0:5000'
method => [HTTP METHOD TO USE] default is 'GET'
nick => [NICK FOR BASIC AUTH] optional
password => [PASSWORD FOR BASIC AUTH] optional
path => [PATH OF REST RESOURCE] default is '/'
req_body => [HASHREF] optional
Returns HASHREF containing:
lib/App/MFILE/HTTP.pm view on Meta::CPAN
die "Bad user agent object" unless ref( $ua ) eq 'LWP::UserAgent';
my %ARGS = validate( @_, {
server => { type => SCALAR, default => 'http://localhost:5000' },
method => { type => SCALAR, default => 'GET', regex => qr/^(GET|POST|PUT|DELETE)$/ },
nick => { type => SCALAR, optional => 1 },
password => { type => SCALAR, default => '' },
path => { type => SCALAR, default => '/' },
req_body => { type => HASHREF, optional => 1 },
} );
$ARGS{'path'} =~ s/^\/*/\//;
lib/App/MFILE/HTTP.pm view on Meta::CPAN
$r = &{ $ARGS{'method'} }( $ARGS{'server'} . encode_utf8( $ARGS{'path'} ),
Accept => 'application/json' );
}
if ( $ARGS{'nick'} ) {
$r->authorization_basic( $ARGS{'nick'}, $ARGS{'password'} );
}
if ( $ARGS{'method'} =~ m/^(POST|PUT)$/ ) {
$r->header( 'Content-Type' => 'application/json' );
if ( my $body = $ARGS{'req_body'} ) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/MPDJ.pm view on Meta::CPAN
sub help {
print <<'HELP';
Usage: mpdj [options]
Options:
--mpd MPD connection string (password@host:port)
-s,--syslog Turns on syslog output (debug, info, notice, warn[ing], error, etc)
-l,--conlog Turns on console output (same choices as --syslog)
--no-daemon Turn off daemonizing
-b,--before Number of songs to keep in playlist before current song
-a,--after Number of songs to keep in playlist after current song
lib/App/MPDJ.pm view on Meta::CPAN
=over 4
=item --mpd
Sets the MPD connection details. Should be a string like password@host:port.
The password and port are both optional.
=item -s, --syslog
Turns on sending of log information to syslog at specified level. Level is a
required parameter can be one of debug, info, notice, warn[ing], err[or],
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/MadEye/Plugin/Agent/Qudo/ExceptionLog.pm view on Meta::CPAN
sub is_dead {
my ($self, $dsn) = @_;
my $conf = $self->config->{config};
my $user = $conf->{user} or die "missing user";
my $password = $conf->{password} or die "missing password";
my $qudo = Qudo->new(
databases => [+{
dsn => $dsn,
username => $user,
password => $password,
}],
);
my $exceptions = $qudo->exception_list;
if (scalar(@{$exceptions->{$dsn}}) >= 1) {
lib/App/MadEye/Plugin/Agent/Qudo/ExceptionLog.pm view on Meta::CPAN
- module: Agent::Qudo::ExceptionLog
config:
target:
- DBI:mysql:database=foo
user: root
password: ~
=head1 SCHEMA
type: map
mapping:
lib/App/MadEye/Plugin/Agent/Qudo/ExceptionLog.pm view on Meta::CPAN
sequence:
- type: str
user:
required: yes
type: str
password:
required: yes
type: str
=head1 SEE ALSO
view all matches for this distribution