Result:
found more than 626 distributions - search limited to the first 2001 files matching your query ( run in 5.297 )


Device-Neurio

 view release on metacpan or  search on metacpan

lib/Device/Neurio.pm  view on Meta::CPAN


    # Submit request for authentiaction token.
    my $response = $self->{'ua'}->post($self->{'base_url'}.'/oauth2/token',
          { basic_authentication => $self->{'base64'},
        	Content_Type         => 'application/x-www-form-urlencoded',
        	grant_type           => 'client_credentials', 
        	client_id            => $self->{'key'},
        	client_secret        => $self->{'secret'},
          }
        );
    

 view all matches for this distribution


Device-PaloAlto-Firewall

 view release on metacpan or  search on metacpan

t/000-http_errors.t  view on Meta::CPAN

     ),
     HTTP::Response->new(
         403, 
         "403 Response", 
         undef,
         q{<response status = 'error' code = '403'><result><msg>Invalid credentials.</msg></result></response>}
     ),
     HTTP::Response->new(
         500, 
         "500 Response", 
         undef,

 view all matches for this distribution


Device-TPLink

 view release on metacpan or  search on metacpan

lib/Device/TPLink/Kasa.pm  view on Meta::CPAN

  unless ($self->username && $self->password) {
    Carp::croak "Username and/or password not set!";
  }

  # We have a username, password, and UUID - everything we need to get a new token
  my $credentials = {
    appType => 'Kasa_Android',
    cloudUserName => $self->username,
    cloudPassword => $self->password,
    terminalUUID => $self->uuid
  };

  my $request_object = {
     method => 'login',
     params => $credentials
  };

  my $user_agent = LWP::UserAgent::JSON->new;
  # Uncomment the next two lines if you need to debug...
  #$user_agent->add_handler("request_send",  sub { shift->dump; return });

 view all matches for this distribution


Dezi-App

 view release on metacpan or  search on metacpan

lib/Dezi/Aggregator/Spider.pm  view on Meta::CPAN

    isa     => Str,
    default => sub {'dezi-spider http://dezi.org/'},
);
has 'authn_callback'     => ( is => 'rw', isa => CodeRef );
has 'credential_timeout' => ( is => 'rw', isa => Int, default => sub {30} );
has 'credentials'        => ( is => 'rw', isa => Str );
has 'delay'              => ( is => 'rw', isa => Int, default => sub {5} );
has 'email' => (
    is      => 'rw',
    isa     => Str,
    default => sub {'dezi@user.failed.to.set.email.invalid'},

lib/Dezi/Aggregator/Spider.pm  view on Meta::CPAN

Get/set the number of seconds to wait before considering the remote
server unresponsive. The default is 10.

=item authn_callback I<code_ref>

CODE reference to fetch username/password credentials when necessary. See also
C<credentials>.

=item credential_timeout I<n>

Number of seconds to wait before skipping manual prompt for username/password.

=item credentials I<user:pass>

String with C<username>:C<password> pair to be used when prompted by
the server.

=item follow_redirects I<1|0>

lib/Dezi/Aggregator/Spider.pm  view on Meta::CPAN

            }
        }

        # otherwise, prompt (over and over)
        if ( !$user_pass ) {
            $user_pass = $self->_get_basic_credentials( $uri, $realm );
        }

        if ($user_pass) {
            $uri->userinfo($user_pass);
            $self->{cur_realm} = $realm;  # save so we can cache if it's valid

lib/Dezi/Aggregator/Spider.pm  view on Meta::CPAN

    return 0;

}

# From spider.pl
sub _get_basic_credentials {
    my ( $self, $uri, $realm ) = @_;

    # Exists but undefined means don't ask.
    return
        if exists $self->{credential_timeout}

lib/Dezi/Aggregator/Spider.pm  view on Meta::CPAN

}

=head2 get_authorized_doc( I<uri>, I<response> )

Called internally when the server returns a 401 or 403 response.
Will attempt to determine the correct credentials for I<uri>
based on the previous attempt in I<response> and what you
have configured in B<credentials>, B<authn_callback> or when
manually prompted.

=cut

sub get_authorized_doc {
    my $self     = shift;
    my $uri      = shift or croak "uri required";
    my $response = shift or croak "response required";

    # set up credentials
    $self->_authorize( $uri, $response->http_response ) or return;

    return $self->_make_request($uri);
}

lib/Dezi/Aggregator/Spider.pm  view on Meta::CPAN

            content => ( $encoding =~ m/utf-8/i ? to_utf8($buf) : $buf ),
            size => $headers->content_length || length( pack 'C0a*', $buf ),
            charset => $encoding,
        );

        # cache whatever credentials were used so we can re-use
        if ( $self->{cur_realm} and $uri->userinfo ) {
            my $key = $uri->canonical->host_port . ':' . $self->{cur_realm};
            $self->{_auth_cache}->add( $key => $uri->userinfo );

            # not too sure of the best logic here

lib/Dezi/Aggregator/Spider.pm  view on Meta::CPAN


sub _get_user_pass {
    my $self = shift;
    my $uri  = shift;

    # Set basic auth if defined - use URI specific first, then credentials.
    # this doesn't track what should have authorization
    my $last_auth;
    if ( $self->{last_auth} ) {
        my $path = $uri->path;
        $path =~ s!/[^/]*$!!;
        $last_auth = $self->{last_auth}->{auth}
            if $self->{last_auth}->{path} eq $path;
    }

    my ( $user, $pass ) = split /:/,
        ( $last_auth || $uri->userinfo || $self->credentials || '' );

    return ( $user, $pass );
}

=head2 looks_like_feed( I<http_response> )

 view all matches for this distribution


Dezi-Client

 view release on metacpan or  search on metacpan

lib/Dezi/Client.pm  view on Meta::CPAN


=item username I<username>

=item password I<password>

If present, the username and password credentials will
be set in each internal HTTP::Request object for any
non-idempotent action (delete(), index(), commit(), rollback()).
 
=back

 view all matches for this distribution


Dezi

 view release on metacpan or  search on metacpan

lib/Dezi/Config.pm  view on Meta::CPAN

    }
    else {
        %args = @_;
    }

    # save credentials in a closure but not plain in args
    my $username      = delete $args{username};
    my $password      = delete $args{password};
    my $authenticator = ( defined $username and defined $password )
        ? sub {
        my ( $u, $p ) = @_;

lib/Dezi/Config.pm  view on Meta::CPAN

    server_class    => 'Dezi::Server',
    
    # authentication for non-idempotent requests.
    # if both username && password are defined,
    # then /index, /commit and /rollback require
    # basic authentication credentials.
    username        => 'someone',
    password        => 'somesecret',
    
    # optional
    # see Dezi::Stats

 view all matches for this distribution


DiaColloDB

 view release on metacpan or  search on metacpan

dcdb-query.perl  view on Meta::CPAN

   -ll                   # score by 1-sided log-likelihood ratio (Evert 2008)
   -eps EPS              # smoothing constant (default=0)
   -diff DIFFOP          # diff operation (adiff|diff|sum|min|max|avg|havg|gavg; default=adiff)

 I/O Options:
   -user USER[:PASSWD]   # user credentials for HTTP queries
   -text		 # use text output (default)
   -json                 # use json output
   -null                 # don't output profile at all
   -[no]pretty           # do/don't pretty-print json output (default=do)
   -log-level LEVEL      # set minimum DiaColloDB log-level

dcdb-query.perl  view on Meta::CPAN


=over 4 

=item -user USER[:PASSWD]

Specify user credentials for HTTP queries

=item -text

generate text output (default).

 view all matches for this distribution


Digest-xxHash

 view release on metacpan or  search on metacpan

ext/xxHash/.github/workflows/scorecard.yml  view on Meta::CPAN


    steps:
      - name: "Checkout code"
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
        with:
          persist-credentials: false

      - name: "Run analysis"
        uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
        with:
          results_file: results.sarif

 view all matches for this distribution


DirDB-FTP

 view release on metacpan or  search on metacpan

FTP.pm  view on Meta::CPAN

will have to edit your copy of the module.

The underlying object is an array containing the Net::FTP
connection object and the absolute path to 
the directory, modulo any chrooting the FTP server might do
based on the provided credentials, of course.

Keys are names within the directory, values
are the contents of the files.

A leading space is used as an escape character, the empty

 view all matches for this distribution


Dist-Zilla-Plugin-Authority

 view release on metacpan or  search on metacpan

lib/Dist/Zilla/Plugin/Authority.pm  view on Meta::CPAN

						}
					}
					close $fh or $self->log_fatal( "Unable to close $file - $!" );
					$self->log_fatal( 'PAUSE user not found in ~/.pause' );
				} else {
					$self->log_fatal( 'PAUSE credentials not found in "config.ini" or "dist.ini" or "~/.pause"! Please set it or specify an authority for this plugin.' );
				}
			}
		},
	);

 view all matches for this distribution


Dist-Zilla-Plugin-Bitbucket

 view release on metacpan or  search on metacpan

lib/Dist/Zilla/Plugin/Bitbucket.pm  view on Meta::CPAN

			die "Unknown local repository type!";
		}
	},
);

sub _get_credentials {
	my ($self, $nopass) = @_;

	# TODO I'm so lazy...
	## no critic (InputOutput::ProhibitBacktickOperators)

lib/Dist/Zilla/Plugin/Bitbucket.pm  view on Meta::CPAN

			}
		}

		# Make sure we return full path including user
		if ($repo !~ /.*\/.*/) {
			($login, undef) = $self->_get_credentials(1);
			$repo = "$login/$repo";
		}
	} else {
		# Get it from .hgrc
		if ( -f '.hg/hgrc' ) {

lib/Dist/Zilla/Plugin/Bitbucket.pm  view on Meta::CPAN


=back

=head2 Configuration

Configure git with your Bitbucket credentials:

	$ git config --global bitbucket.user LoginName
	$ git config --global bitbucket.password MySecretPassword

Alternatively you can install L<Config::Identity> and write your credentials
in the (optionally GPG-encrypted) C<~/.bitbucket> file as follows:

	login LoginName
	password MySecretPassword

 view all matches for this distribution


Dist-Zilla-Plugin-Docker-API

 view release on metacpan or  search on metacpan

lib/Dist/Zilla/Plugin/Docker/API.pm  view on Meta::CPAN

#
# The phase hook that runs early enough is before_build, and it can tell a
# release from a plain build: Dist::Zilla::Dist::Builder::release sets
# DZIL_RELEASING before it calls build_archive, so the variable is already
# there when this hook runs (measured against Dist::Zilla 6.037). A plain
# dzil build never sets it and so never needs registry credentials.
#
# Only the registry host of `image` decides which credential applies, and
# that part carries no template variables, so no expansion is needed here.
sub _precheck_registry_auth {
    my ($self) = @_;

lib/Dist/Zilla/Plugin/Docker/API.pm  view on Meta::CPAN

    }

    # No credential found for that registry. An anonymous push is a legal
    # thing to attempt, so this is a note, not a failure.
    unless (defined $status) {
        $self->log('Docker::API: no registry credentials found for '
            .$image_ref.' - the release push will be anonymous');
        return;
    }

    $self->log('Docker::API registry credentials accepted for '.$image_ref);
}

sub after_build {
    my ($self, $arg) = @_;

lib/Dist/Zilla/Plugin/Docker/API.pm  view on Meta::CPAN

When C<before_build> runs as part of C<dzil release> (Dist::Zilla sets
C<DZIL_RELEASING> before it calls C<build_archive>, which is early enough to
tell a release from a plain build) and both C<release_enabled> and
C<release_push> are true, the same hook also pre-flights the registry
credential the eventual push would use -- resolved as described in
L</"Registry credentials"> below -- and hands it to the engine's
C<POST /auth> (C<< system->auth >>) before anything is built. A plain
C<dzil build> never triggers this and needs no registry credentials at all.
No credential resolved for the registry is not a failure -- an anonymous push
is a legal thing to attempt, so nothing is checked and nothing fails. A
failed check is fatal, before the build starts, and its message says only
that the check failed, not that the credential was rejected: Podman answers
a rejected credential and an unreachable registry with the same C<500>, so

lib/Dist/Zilla/Plugin/Docker/API.pm  view on Meta::CPAN

C<dzil build> / C<dzil install> / C<dzil test> while the image cannot build
yet, for example while a dependency pinned in the F<Dockerfile>'s C<cpanm>
run is not released. C<dzil release> refuses to run with the variable set:
a skipped build phase means there is no image to tag and push.

=head2 Registry credentials

The release push, the C<fail_if_tag_exists> lookup and the registry
credential precheck above all resolve a credential for an image reference
the same way, through C<auth_for_image_ref>: the C<auths> block of
F<config.json> in the directory named by C<DOCKER_CONFIG>, or

lib/Dist/Zilla/Plugin/Docker/API.pm  view on Meta::CPAN

=item C<fail_if_tag_exists> - Abort the release if any tag already exists on
the remote registry (default: false). The check runs before anything is
tagged or pushed, and only when C<release_push> is also true. It asks the
I<registry>, not the local daemon, through C<API::Docker>'s
C<< distribution->exists >> (C<GET /distribution/{name}/json>), using the
credential resolved for C<image> (see L</"Registry credentials">), or an
anonymous request when none applies.

An engine that has no C</distribution> route -- rootless Podman among them --
cannot answer the question at all, and that is treated as a release-stopping
failure rather than as "the tag is free": the release aborts with the

 view all matches for this distribution


Dist-Zilla-Plugin-GitHub-CreateRelease

 view release on metacpan or  search on metacpan

bin/createrelease.pl  view on Meta::CPAN

code fence.

=head1 GITHUB API AUTHENTICATION

The script uses L<Config::Identity::GitHub> to obtain the GitHub API
credentials, and requires a file in your home directory named
F<.github-identity> containing:

 login github_username OR github_organization
 token github_....

 view all matches for this distribution


Dist-Zilla-Plugin-GitHub-UploadRelease

 view release on metacpan or  search on metacpan

lib/Dist/Zilla/Plugin/GitHub/UploadRelease.pm  view on Meta::CPAN


    $self->log_debug("$method $url");

    $headers //= {};

    my ($login, $pass, $otp) = $self->_get_credentials(0);

    if ($pass) {
        my $basic = encode_base64("$login:$pass", '');
        $headers->{Authorization} = "Basic $basic";
    }

lib/Dist/Zilla/Plugin/GitHub/UploadRelease.pm  view on Meta::CPAN

sub after_release {
    my ($self, $archive) = @_;

    my $dist_name = $self->zilla->name;

    my ($login) = $self->_get_credentials(1);
    return unless $login;

    my $repo_name = $self->_get_repo_name($login);

    my $git_tag_plugin = $self->zilla->plugin_named('Git::Tag') // $self->log_fatal('Plugin Git::Tag not found');

lib/Dist/Zilla/Plugin/GitHub/UploadRelease.pm  view on Meta::CPAN


version 0.002

=head1 SYNOPSIS

Configure git with your GitHub credentials:

    git config --global github.user LoginName
    git config --global github.password GitHubPassword

Alternatively you can install L<Config::Identity> and write your credentials in the (optionally GPG-encrypted) C<~/.github> file as follows:

    login LoginName
    password GitHubpassword

(if only the login name is set, the password will be asked interactively)

 view all matches for this distribution


Dist-Zilla-Plugin-GitHub

 view release on metacpan or  search on metacpan

lib/Dist/Zilla/Plugin/GitHub.pm  view on Meta::CPAN

    isa     => 'Maybe[Str]',
    lazy    => 1,
    builder => '_build_login',
);

has _credentials => (
    is => 'ro',
    isa => 'HashRef',
    lazy => 1,
    builder => '_build_credentials',
);

#pod =head1 DESCRIPTION
#pod
#pod B<Dist-Zilla-Plugin-GitHub> is a set of plugins for L<Dist::Zilla> intended

lib/Dist/Zilla/Plugin/GitHub.pm  view on Meta::CPAN

    }

    return $login;
}

sub _build_credentials {
    my $self = shift;

    my ($login, $pass, $token);

    $login = $self->_login;

lib/Dist/Zilla/Plugin/GitHub.pm  view on Meta::CPAN

    }

    return { login => $login, pass => $pass, token => $token };
}

sub _has_credentials {
    my $self = shift;
    return keys %{$self->_credentials};
}

sub _auth_headers {
    my $self = shift;

    my $credentials = $self->_credentials;

    my %headers = ( Accept => 'application/vnd.github.v3+json' );
    if ($credentials->{pass}) {
        require MIME::Base64;
        my $basic = MIME::Base64::encode_base64("$credentials->{login}:$credentials->{pass}", '');
        $headers{Authorization} = "Basic $basic";
    }
    elsif ($credentials->{token}) {
       $headers{Authorization} = "token $credentials->{token}";
    }

    # This can't be done at object creation because we autodetect the
    # need for 2FA when GitHub says we need it, so we won't know to
    # prompt at object creation time.
    if ($self->prompt_2fa) {
        my $otp = $self->zilla->chrome->prompt_str(
            "GitHub two-factor authentication code for '$credentials->{login}'",
            { noecho => 1 },
        );

        $headers{'X-GitHub-OTP'} = $otp;
        $self->log([ "Using two-factor authentication" ]);

 view all matches for this distribution


Dist-Zilla-Plugin-LicenseFile

 view release on metacpan or  search on metacpan

.gitignore  view on Meta::CPAN

*.bs
# Testing
cover_db/
pod2htmd.tmp
# Claude Code — commit: skills/, agents/, hooks/, settings.json
# Ignore: local overrides, credentials, session data
.claude/*.local.*
.claude/local/
.claude/.credentials.json
.claude/statsig/
.claude/todos/
.claude/projects/

 view all matches for this distribution


Dist-Zilla-Plugin-NexusRelease

 view release on metacpan or  search on metacpan

lib/Dist/Zilla/Plugin/NexusRelease.pm  view on Meta::CPAN

        $self->{'Dist::Zilla'}{plugin}->log(@_);
    }
}


has credentials_stash => (
    is      => 'ro',
    isa     => 'Str',
    default => '%Nexus'
);

has _credentials_stash_obj => (
    is       => 'ro',
    isa      => maybe_type( class_type('Dist::Zilla::Stash::Nexus') ),
    lazy     => 1,
    init_arg => undef,
    default  => sub { $_[0]->zilla->stash_named( $_[0]->credentials_stash ) },
);

sub _credential {
    my ( $self, $name ) = @_;

    return unless my $stash = $self->_credentials_stash_obj;
    return $stash->$name;
}


has username => (

lib/Dist/Zilla/Plugin/NexusRelease.pm  view on Meta::CPAN


The Nexus Artefact is set to the Perl distribution name (C<name> in F<dist.ini>, and the version is set to the Perl distribution version.

=head1 ATTRIBUTES

=head2 credentials_stash

This attribute holds the name of a L<Nexus stash|Dist::Zilla::Stash::Nexus>
that will contain the credentials to be used for the upload.  By default,
NexusRelease will look for a C<%Nexus> stash.

=head2 username

This is the Nexus user to log in with.

 view all matches for this distribution


Dist-Zilla-Plugin-PERLANCAR-Authority

 view release on metacpan or  search on metacpan

lib/Dist/Zilla/Plugin/PERLANCAR/Authority.pm  view on Meta::CPAN

						}
					}
					close $fh or $self->log_fatal( "Unable to close $file - $!" );
					$self->log_fatal( 'PAUSE user not found in ~/.pause' );
				} else {
                                    $self->log( 'PAUSE credentials not found in "config.ini" or "dist.ini" or "~/.pause", will be using "cpan:<none>" as the AUTHORITY' );
                                    return 'cpan:<none>';
				}
			}
		},
	);

lib/Dist/Zilla/Plugin/PERLANCAR/Authority.pm  view on Meta::CPAN


=head1 DESCRIPTION

B<Fork note>: This plugin is a fork of L<Dist::Zilla::Plugin::Authority>. When
PAUSE credential is not found, this plugin will set C<$AUTHORITY> to C<<
cpan:<none> >> instead of bailing out. TODO: bail if PAUSE credentials is not
found and we are doing a release (instead of just 'dzil test' or 'dzil build').
The rest is Dist::Zilla::Plugin::Authority's documentation.

This plugin adds the authority data to your distribution. It adds the data to
your modules and metadata. Normally it looks for the PAUSE author id in your

 view all matches for this distribution


Dist-Zilla-Plugin-Pinto-Add

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

    before, you'll need to replace it with "recurse = 0" in your
    dist.ini file.

   [BUG FIXES]

   - The plugin was ignoring your authentication credentials when
   using a remote repository [GitHub #7].  Thanks @hstaugaard.

0.085     2014-01-13 14:48:42 America/Los_Angeles

    [BUG FIXES]

 view all matches for this distribution


Dist-Zilla-Plugin-Subversion

 view release on metacpan or  search on metacpan

lib/Dist/Zilla/Role/Subversion.pm  view on Meta::CPAN


=head1 ATTRIBUTES

=head2 svn_user

Your Subversion user ID.  Defaults to the cached credentials for your
distribution's working copy.

=head2 svn_password

Your Subversion password.  Defaults to the cached credentials for your
distribution's working copy.

=head2 working_url

URL for the directory currently holding your distribution.  Defaults to your

 view all matches for this distribution


Dist-Zilla-Plugin-UploadToCPAN-WWWPAUSESimple

 view release on metacpan or  search on metacpan

lib/Dist/Zilla/Plugin/UploadToCPAN/WWWPAUSESimple.pm  view on Meta::CPAN

use Scalar::Util qw(weaken);
use Try::Tiny;

use namespace::autoclean;

has credentials_stash => (
  is  => 'ro',
  isa => 'Str',
  default => '%PAUSE'
);

has _credentials_stash_obj => (
  is   => 'ro',
  isa  => maybe_type( class_type('Dist::Zilla::Stash::PAUSE') ),
  lazy => 1,
  init_arg => undef,
  default  => sub { $_[0]->zilla->stash_named( $_[0]->credentials_stash ) },
);

sub _credential {
  my ($self, $name) = @_;

  return unless my $stash = $self->_credentials_stash_obj;
  return $stash->$name;
}

sub mvp_aliases {
  return { user => 'username' };

 view all matches for this distribution


Dist-Zilla-Plugin-UploadToGoogleCode

 view release on metacpan or  search on metacpan

lib/Dist/Zilla/Plugin/UploadToGoogleCode.pm  view on Meta::CPAN

If loaded, this plugin will allow the F<release> command to upload to Google Code.

=head1 DESCRIPTION

This plugin looks for the Google Code project name in F<dist.ini>, and gets your
Google Code credentials from F<~/.googlecode-identity> (which can be
GnuPG-encrypted; see L<Config::Identity>).

If any configuration is missing, it will prompt you to enter your
username and password during the BeforeRelease phase.  Entering a
blank username or password will abort the release.

 view all matches for this distribution


Dist-Zilla-PluginBundle-Author-DOHERTY

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN


0.28      2012-06-14
  - Only do post-release stuff if it was a real release
  - Require @GitHub 0.22
    - bug related to finding a fork's parent repo
    - Now uses Config::Identity to get credentials

0.27      2012-05-25
  - Add SchwartzRatio plugin
  - Allow setting github = 0 to disable GitHub::Meta and GitHub::Update

 view all matches for this distribution


Dist-Zilla-PluginBundle-Author-ETHER

 view release on metacpan or  search on metacpan

lib/Dist/Zilla/PluginBundle/Author/ETHER.pm  view on Meta::CPAN

      unless File::Spec->file_name_is_absolute($file);
    return {} unless -e $file && -r _;
    my $cfg = try {
      CPAN::Uploader->read_config_file($file)
    } catch {
      warn "[\@Author::ETHER] Couldn't load credentials from '$file': $_";
      {};
    };
    return $cfg;
}

 view all matches for this distribution


Dist-Zilla-PluginBundle-Author-GETTY

 view release on metacpan or  search on metacpan

.gitignore  view on Meta::CPAN

# Claude Code — commit: skills/, agents/, rules/, hooks/, settings.json
# Ignore: local overrides, credentials, session data

# Tracked: shared config & extensibility
!/.claude/
.claude/*
!.claude/settings.json

.gitignore  view on Meta::CPAN

# Local overrides (machine-specific)
.claude/*.local.*
.claude/local/

# Credentials & session state (never track)
.claude/.credentials.json
.claude/statsig/
.claude/todos/
.claude/projects/

Dist-Zilla-PluginBundle-Author-GETTY-*

 view all matches for this distribution


Dist-Zilla-PluginBundle-Author-GSG

 view release on metacpan or  search on metacpan

lib/Dist/Zilla/PluginBundle/Author/GSG.pm  view on Meta::CPAN

    local $git_tag_plugin->{plugin_name} = 'Git::Tag';

    return $self->$orig(@args);
};

sub _get_credentials {
    my ($self, $login_only) = @_;

    my $creds = $self->_credentials;
    # return $creds->{login} if $login_only;

    my $otp;
    $otp = $self->zilla->chrome->prompt_str(
        "GitHub two-factor authentication code for '$creds->{login}'",

 view all matches for this distribution


Dist-Zilla-PluginBundle-Codeberg

 view release on metacpan or  search on metacpan

lib/Dist/Zilla/Plugin/Codeberg.pm  view on Meta::CPAN

has repo => (
   is  => 'ro',
   isa => 'Maybe[Str]',
);

has _credentials => (
   is      => 'ro',
   isa     => 'HashRef',
   lazy    => 1,
   builder => '_build_credentials',
);

has _login => (
   is      => 'ro',
   isa     => 'Maybe[Str]',

lib/Dist/Zilla/Plugin/Codeberg.pm  view on Meta::CPAN

   }

   return $login;
}

sub _build_credentials {
   my $self = shift;

   my ( $login, $token );

   $login = $self->_login;

lib/Dist/Zilla/Plugin/Codeberg.pm  view on Meta::CPAN

   }

   return { login => $login, token => $token };
}

sub _has_credentials {
   my $self = shift;
   return keys %{ $self->_credentials };
}

sub _auth_headers {
   my $self = shift;

   my $credentials = $self->_credentials;
   my %headers     = ();
   if ( $credentials->{token} ) {
      $headers{'Authorization'} = 'token ' . $credentials->{token};
   }

   return \%headers;
}

 view all matches for this distribution


Dist-Zilla-PluginBundle-GitLab

 view release on metacpan or  search on metacpan

lib/Dist/Zilla/Plugin/GitLab.pm  view on Meta::CPAN

has repo => (
   is  => 'ro',
   isa => 'Maybe[Str]',
);

has _credentials => (
   is      => 'ro',
   isa     => 'HashRef',
   lazy    => 1,
   builder => '_build_credentials',
);

has _login => (
   is      => 'ro',
   isa     => 'Maybe[Str]',

lib/Dist/Zilla/Plugin/GitLab.pm  view on Meta::CPAN

   }

   return $login;
}

sub _build_credentials {
   my $self = shift;

   my ( $login, $token );

   $login = $self->_login;

lib/Dist/Zilla/Plugin/GitLab.pm  view on Meta::CPAN

   }

   return { login => $login, token => $token };
}

sub _has_credentials {
   my $self = shift;
   return keys %{ $self->_credentials };
}

sub _auth_headers {
   my $self = shift;

   my $credentials = $self->_credentials;

   my %headers = ();
   if ( $credentials->{token} ) {
      $headers{'PRIVATE-TOKEN'} = $credentials->{token};
   }

   return \%headers;
}

 view all matches for this distribution


Dist-Zilla-Role-EnsureStash

 view release on metacpan or  search on metacpan

lib/Dist/Zilla/Role/EnsureStash.pm  view on Meta::CPAN

This is a L<Dist::Zilla> role designed to ensure that if a plugin needs access
to a stash, and that stash does not already exist, then it is automatically
created and returned.

This is more intended for helping plugins that need to share common data do so
via stashes, rather than specific information (e.g. PAUSE credentials and the
like).  As such, the stash instances created here are expected to largely be
able to do their thing without much (preferably any) external input.

=head1 REQUIRED METHODS

 view all matches for this distribution


Dist-Zilla

 view release on metacpan or  search on metacpan

lib/Dist/Zilla/Plugin/UploadToCPAN.pm  view on Meta::CPAN

    my $self = shift;
    $self->{'Dist::Zilla'}{plugin}->log(@_);
  }
}

#pod =attr credentials_stash
#pod
#pod This attribute holds the name of a L<PAUSE stash|Dist::Zilla::Stash::Login>
#pod that will contain the credentials to be used for the upload.  By default,
#pod UploadToCPAN will look for a C<%PAUSE> stash.
#pod
#pod =cut

has credentials_stash => (
  is  => 'ro',
  isa => 'Str',
  default => '%PAUSE'
);

has _credentials_stash_obj => (
  is   => 'ro',
  isa  => maybe_type( role_type('Dist::Zilla::Role::Stash::Login') ),
  lazy => 1,
  init_arg => undef,
  default  => sub { $_[0]->zilla->stash_named( $_[0]->credentials_stash ) },
);

sub _credential {
  my ($self, $name) = @_;

  return unless my $stash = $self->_credentials_stash_obj;
  return $stash->$name;
}

sub mvp_aliases {
  return { user => 'username' };

lib/Dist/Zilla/Plugin/UploadToCPAN.pm  view on Meta::CPAN

  },
);

#pod =attr pause_cfg_file
#pod
#pod This is the name of the file containing your pause credentials.  It defaults
#pod F<.pause>.  If you give a relative path, it is taken to be relative to
#pod L</pause_cfg_dir>.
#pod
#pod =cut

lib/Dist/Zilla/Plugin/UploadToCPAN.pm  view on Meta::CPAN

      unless File::Spec->file_name_is_absolute($file);
    return {} unless -e $file && -r _;
    my $cfg = try {
      CPAN::Uploader->read_config_file($file)
    } catch {
      $self->log("Couldn't load credentials from '$file': $_");
      {};
    };
    return $cfg;
  },
);

lib/Dist/Zilla/Plugin/UploadToCPAN.pm  view on Meta::CPAN

for any reason, and there is no promise that patches will be accepted to
lower the minimum required perl.

=head1 ATTRIBUTES

=head2 credentials_stash

This attribute holds the name of a L<PAUSE stash|Dist::Zilla::Stash::Login>
that will contain the credentials to be used for the upload.  By default,
UploadToCPAN will look for a C<%PAUSE> stash.

=head2 username

This option supplies the user's PAUSE username.

lib/Dist/Zilla/Plugin/UploadToCPAN.pm  view on Meta::CPAN

F<dist.ini>.  It will be looked for in the user's PAUSE configuration; if not
found, the user will be prompted.

=head2 pause_cfg_file

This is the name of the file containing your pause credentials.  It defaults
F<.pause>.  If you give a relative path, it is taken to be relative to
L</pause_cfg_dir>.

=head2 pause_cfg_dir

 view all matches for this distribution


( run in 5.297 seconds using v1.01-cache-2.11-cpan-007c89162af )