Next refresh should show more results. ( run in 4.024 )
view release on metacpan or search on metacpan
lib/Mojolicious/Plugin/ACME/Command/acme/cert/generate.pm view on Meta::CPAN
sub { $acme->check_all_challenges(shift->begin) },
sub {
my ($delay, $err) = @_;
die Mojo::Util::dumper($err) if $err;
my $bad = c(values %{ $acme->challenges })->grep(sub { $_->{status} ne 'valid' });
die 'The following challenges were not validated ' . Mojo::Util::dumper($bad->to_array) if $bad->size;
#TODO poll for cert when delayed
$cert = $acme->get_cert(@domains);
},
)->catch(sub{ warn "$_[-1]\n" })->wait;
view all matches for this distributionview release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/Mojo/ATProto/OAuth.pm view on Meta::CPAN
# no known nonce is expected to be rejected with a fresh one to retry
# with) - used by both send_auth_request (PAR) and
# send_initial_token_request (token exchange), matching indigo's own
# identical 2-attempt loop in both SendAuthRequest and
# SendInitialTokenRequest. Returns ($res, $final_dpop_nonce); does not
# itself validate the final response status - callers differ on what a
# success response looks like (200 vs. 200/201).
sub _post_dpop_retry($self, %args) {
my $url = $args{url};
my $body = $args{body};
my $key = $args{key};
lib/Mojo/ATProto/OAuth.pm view on Meta::CPAN
# auth_server_revocation_endpoint, dpop_authserver_nonce,
# dpop_private_key_pem - everything a store needs to persist and later
# exchange for tokens via send_initial_token_request(_p) below.
#
# $auth_meta is the hashref Mojo::ATProto::OAuth::Resolver::
# resolve_auth_server_metadata(_p) already validated. Low-level: doesn't
# persist anything or resolve an identity - see start_auth_flow(_p) for
# the full orchestration.
sub send_auth_request($self, $auth_meta, %opts) {
my $scopes = _normalize_scopes($opts{scopes}) // $self->scopes;
my $login_hint = $opts{login_hint};
lib/Mojo/ATProto/OAuth.pm view on Meta::CPAN
sub _union_scopes($self, $a, $b) {
my %union = map { $_ => 1 } (@{$a // []}, @{$b // []});
return [sort keys %union];
}
sub _validate_callback_params($self, $info, $params) {
if (length($params->{error} // '')) {
my $msg = "OAuth request callback error: $params->{error}";
$msg .= ": $params->{error_description}" if length($params->{error_description} // '');
die "$msg\n";
}
lib/Mojo/ATProto/OAuth.pm view on Meta::CPAN
my $state = $params->{state} // die "missing state query param\n";
$self->log->debug("process_callback: state=$state iss=" . ($params->{iss} // '?')) if DEBUG;
my $info = $self->store->get_auth_request($state);
my ($authserver_url, $auth_code) = $self->_validate_callback_params($info, $params);
my $token_resp = $self->send_initial_token_request($auth_code, $info);
my ($account_did, $handle, $host_url);
if (length($info->{account_did} // '')) {
$account_did = $info->{account_did};
lib/Mojo/ATProto/OAuth.pm view on Meta::CPAN
my $state = $params->{state} // return Mojo::Promise->reject("missing state query param\n");
$self->log->debug("process_callback_p: state=$state iss=" . ($params->{iss} // '?')) if DEBUG;
return $self->store->get_auth_request_p($state)->then(sub ($info) {
my ($authserver_url, $auth_code) = $self->_validate_callback_params($info, $params);
return $self->send_initial_token_request_p($auth_code, $info)->then(sub ($token_resp) {
if (length($info->{account_did} // '')) {
my $account_did = $info->{account_did};
die "token subject didn't match original DID\n" unless $token_resp->{sub} eq $account_did;
lib/Mojo/ATProto/OAuth.pm view on Meta::CPAN
store => $store, # optional
);
Builds a client using ATProto OAuth's "loopback client" allowance for local-dev testing (ported from indigo's C<NewLocalhostConfig>): rather than a real C<https://> C<client_id> URL serving a fetched metadata document, C<client_id> is the fixed senti...
The C<client_id> host is the literal string C<localhost> - a fixed spec sentinel, not a real address to resolve. That is a separate thing from C<callback_url>, which must actually point at C<127.0.0.1> (not C<localhost>) for a plain-C<http> redirect ...
=head2 new
my $oauth = Mojo::ATProto::OAuth->new(
client_id => $client_id, # required, in the form of https://your-site.com/client-metadata.json or something appropriate
lib/Mojo/ATProto/OAuth.pm view on Meta::CPAN
=head2 send_auth_request / send_auth_request_p
my $info = $oauth->send_auth_request($auth_meta, %opts);
Sends the PAR request that kicks off an authorization flow, given already-validated auth-server metadata (as returned by L<Mojo::ATProto::OAuth::Resolver/resolve_auth_server_metadata>). C<%opts>: C<scopes> (optional, arrayref or space-separated stri...
=head2 send_initial_token_request / send_initial_token_request_p
my $token_resp = $oauth->send_initial_token_request($auth_code, $info);
view all matches for this distributionview release on metacpan - search on metacpan
view release on metacpan or search on metacpan
utilize|||
uvchr_to_utf8_flags||5.007003|
uvchr_to_utf8|||
uvuni_to_utf8_flags||5.007003|
uvuni_to_utf8||5.007001|
validate_suid|||
varname|||
vcmp||5.009000|
vcroak||5.006000|
vdeb||5.007003|
vdie_common|||
view all matches for this distributionview release on metacpan - search on metacpan
view release on metacpan or search on metacpan
META.yml
README
cpanfile
dist.ini
lib/Mojo/Collection/Role/Transform.pm
t/_reduce_validate.t
t/author-pod-syntax.t
t/collect_by.t
t/hashify.t
t/hashify_collect.t
t/options_validate.t
view all matches for this distributionview release on metacpan - search on metacpan
view release on metacpan or search on metacpan
_Deparsed_XSubs.pm view on Meta::CPAN
}
package Params::Util::PP {
sub looks_like_number($) ;
}
package Params::Validate::XS {
sub validate(\@$) ;
sub validate_pos(\@@) ;
sub validate_with;
}
package Params::ValidationCompiler::Compiler {
sub blessed($) ;
sub looks_like_number($) ;
sub pairkeys(@) ;
_Deparsed_XSubs.pm view on Meta::CPAN
sub _nextcan;
sub get_isarev($) ;
sub get_linear_isa($;$) ;
sub get_mro($) ;
sub get_pkg_gen($) ;
sub invalidate_all_method_caches() ;
sub is_universal($) ;
sub method_changed_in($) ;
sub set_mro($$) ;
}
package re {
view all matches for this distributionview release on metacpan - search on metacpan
view release on metacpan or search on metacpan
t/connector_defaults.t
t/new_connection.t
t/new_connection_overrides.t
t/options_merge_append_replace.t
t/results_roles.t
t/scheme_validate.t
t/strict_mysql.t
t/strict_pg.t
META.yml
MANIFEST
view all matches for this distributionview release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/Mojo/DB/Results/Role/MoreMethods.pm view on Meta::CPAN
sub _parse_transform_options {
my $self = shift;
my $private_options = shift;
my $options = ref $_[0] eq 'HASH' ? shift : {};
my ($key, $key_ref) = _parse_and_validate_transform_key(shift);
my ($value, $value_is_column, $value_ref) = _parse_and_validate_transform_value(@_);
my ($type, $flatten) = _parse_and_validate_transform_options($private_options, $options);
# if user will not access the rows and the type won't be used, default rows to arrays for speed
if (($value_is_column or $flatten) and $key_ref ne 'CODE' and $value_ref ne 'CODE') {
if ($type and $type ne 'array') {
Carp::cluck 'Useless type option provided. array will be used for performance.';
lib/Mojo/DB/Results/Role/MoreMethods.pm view on Meta::CPAN
;
return $collection, $get_keys, $get_value, $flatten;
}
sub _parse_and_validate_transform_key {
my ($key) = @_;
my $key_ref = ref $key;
if ($key_ref) {
Carp::confess qq{key must be an arrayref, a sub or a non-empty string, but had ref '$key_ref'}
lib/Mojo/DB/Results/Role/MoreMethods.pm view on Meta::CPAN
}
return $key, $key_ref;
}
sub _parse_and_validate_transform_value {
my ($value, $value_is_column);
my $value_ref;
if (@_ == 1) {
$value = shift;
lib/Mojo/DB/Results/Role/MoreMethods.pm view on Meta::CPAN
}
return $value, $value_is_column, $value_ref // '';
}
sub _parse_and_validate_transform_options {
my ($private_options, $options) = @_;
my $flatten;
if ($private_options->{flatten_allowed}) {
$flatten = delete $options->{flatten};
view all matches for this distributionview release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/Mojo/DOM/Role/Restrict.pm view on Meta::CPAN
}
sub _valid_tag {
my ($spec, $tag, $attrs) = @_;
my $valid = $spec->{$tag} // $spec->{'*'};
return ref $valid && $valid->{validate_tag}
? $valid->{validate_tag}($tag, $attrs)
: $valid
? ($tag, $attrs)
: 0;
}
lib/Mojo/DOM/Role/Restrict.pm view on Meta::CPAN
my $match = $val =~ m/^okay$/;
return $match ? ($attr, $val) : 0;
}
},
span => {
validate_tag => sub { # replace span tags with b tags
return ('b', $_[1]);
}
},
p => {
validate_tag => sub {
$_[1]->{id} = "prefixed-" . $_[1]->{id}; # prefix all p tag IDs
$_[1]->{'data-unknown'} = 'abc'; # extend all p tags with a data-unknown attribute
return @_;
}
},
lib/Mojo/DOM/Role/Restrict.pm view on Meta::CPAN
my $match = $val =~ m/^okay$/;
return $match ? ($attr, $val) : 0;
}
},
span => {
validate_tag => sub { # replace span tags with b tags
return ('b', $_[1]);
}
},
p => {
validate_tag => sub {
$_[1]->{id} = "prefixed-" . $_[1]->{id}; # prefix all p tag IDs
$_[1]->{'data-unknown'} = 'abc'; # extend all p tags with a data-unknown attribute
return @_;
}
},
view all matches for this distributionview release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/Mojo/Darkpan/Config.pm view on Meta::CPAN
my $self = shift;
my $location = $ENV{DARKPAN_CONFIG_FILE};
if (defined($location)) {
$self->_validateAssetLocation($location);
my $file = Mojo::File->new($location);
my $config = JSON->new->utf8->decode($file->slurp);
return $config;
lib/Mojo/Darkpan/Config.pm view on Meta::CPAN
}
# default if undef
$dir //= 'darkpan';
$dir = $self->_validateAssetLocation($dir);
return $dir;
}
sub _build_compressIndex {
lib/Mojo/Darkpan/Config.pm view on Meta::CPAN
$compress //= 1;
return $compress;
}
sub _validateAssetLocation {
my $self = shift;
my $dir = shift;
if ($dir !~ m/^\//) {
$dir =~ s/^\.\///;
view all matches for this distributionview release on metacpan - search on metacpan
view release on metacpan or search on metacpan
t/samples/perlmonks.html view on Meta::CPAN
any other options ?
</i>
<br />
<br />
Do we have some perl code checker available for us to validate scripts / modules ?
<br />Thanks
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-1052035">
<i>Do not wait to strike when the iron is hot! Make it hot by striking - WB Yeats</i>
view all matches for this distributionview release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/Mojo/JWT.pm view on Meta::CPAN
=head2 verify_rsa
my $bool = $jwt->verify_rsa($size, $payload, $signature);
Returns true if the given RSA size algorithm validates the given payload and signature.
The L</public> attribute is used as the public key.
This method is provided mostly for the purposes of subclassing.
=head1 SEE ALSO
view all matches for this distributionview release on metacpan - search on metacpan
view release on metacpan or search on metacpan
bin/mojo-prettytidy view on Meta::CPAN
my $cfg = {};
my @files = _collect_input_files( @inputs );
if ( $opt_source{config} eq 'cli' ) {
$cfg = _load_config_file( $opt{config} );
_validate_config( $cfg, $opt{config} );
} else {
my $config_path = _find_default_config_file();
if ( length $config_path ) {
$opt{config} = $config_path;
$opt_source{config} = 'auto';
$cfg = _load_config_file( $config_path );
_validate_config( $cfg, $config_path );
}
}
for my $name (
qw(attributes columns indent_width javascript outdir perl prefix
bin/mojo-prettytidy view on Meta::CPAN
open my $fh, '>', $path or die "Cannot open '$path' for writing: $!";
print {$fh} $content or die "Cannot write '$path': $!";
close $fh or die "Cannot close '$path': $!";
}
sub _validate_config ( $cfg, $path ) {
my %allowed = map { $_ => 1 } qw(
attributes
columns
indent_width
javascript
view all matches for this distributionview release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/Mojo/Run.pm view on Meta::CPAN
."Limit of " . $self->max_forks . " concurrently spawned process(es) is reached."
);
return 0;
}
# normalize and validate run parameters...
my $proc = $self->_getRunStruct(\%opt);
return 0 unless $self->_validateRunStruct($proc);
$self->log->debug("Spawning command "
."timeout: "
.($proc->{exec_timeout} > 0 ? sprintf("%-.3f seconds]", $proc->{exec_timeout}) : "none")
." : [$proc->{cmd}]"
lib/Mojo/Run.pm view on Meta::CPAN
for grep { exists $s->{$_} } keys %$opt;
return $s;
}
sub _validateRunStruct {
my ($self, $s) = @_;
# command?
$self->error('Undefined command.') and return
unless defined $s->{cmd};
view all matches for this distributionview release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/Mojo/SAML/Document.pm view on Meta::CPAN
$doc->before_render();
Called during rendering (see L</to_string>) before the document is rendered.
It is provided here to allow overriding by specific document types.
This method can be used to pre-process and/or validate the object before rendering.
The return value is ignored.
The default implementation does nothing.
=head2 build_template
view all matches for this distributionview release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/Mojo/UserAgent/Cached.pm view on Meta::CPAN
return bless($ua, $class);
}
sub invalidate {
my ($self, $key) = @_;
if ($self->is_cacheable($key)) {
$self->logger->debug("Invalidating cache for '$key'");
return $self->cache_agent->remove($key);
lib/Mojo/UserAgent/Cached.pm view on Meta::CPAN
=head1 METHODS
L<Mojo::UserAgent::Cached> inherits all methods from L<Mojo::UserAgent> and
implements the following new ones.
=head2 invalidate
$ua->invalidate($key);
Deletes the cache of the given $key.
=head2 expire
lib/Mojo/UserAgent/Cached.pm view on Meta::CPAN
=head2 generate_key(@params)
Returns a key to be used for the cache agent. It accepts the same parameters
that a normal ->get() request does.
=head2 validate_key
my $status = $ua4->validate_key('http://example.com');
Fast validates if key is valid in cache without doing fetch.
Return 1 if true.
=head2 sort_query($url)
Returns a string with the URL passed, with sorted query parameters suitable for cache lookup
view all matches for this distributionview release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/Mojo/Webqq/Run.pm view on Meta::CPAN
."Limit of " . $self->max_forks . " concurrently spawned process(es) is reached."
);
return 0;
}
# normalize and validate run parameters...
my $proc = $self->_getRunStruct(\%opt);
return 0 unless $self->_validateRunStruct($proc);
$self->log->debug("Spawning command "
."timeout: "
.($proc->{exec_timeout} > 0 ? sprintf("%-.3f seconds]", $proc->{exec_timeout}) : "none")
." : [$proc->{cmd}]"
lib/Mojo/Webqq/Run.pm view on Meta::CPAN
for grep { exists $s->{$_} } keys %$opt;
return $s;
}
sub _validateRunStruct {
my ($self, $s) = @_;
# command?
$self->error('Undefined command.') and return
unless defined $s->{cmd};
view all matches for this distributionview release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/Mojo/Weixin/Run.pm view on Meta::CPAN
."Limit of " . $self->max_forks . " concurrently spawned process(es) is reached."
);
return 0;
}
# normalize and validate run parameters...
my $proc = $self->_getRunStruct(\%opt);
return 0 unless $self->_validateRunStruct($proc);
$self->log->debug("Spawning command "
."timeout: "
.($proc->{exec_timeout} > 0 ? sprintf("%-.3f seconds]", $proc->{exec_timeout}) : "none")
." : [$proc->{cmd}]"
lib/Mojo/Weixin/Run.pm view on Meta::CPAN
for grep { exists $s->{$_} } keys %$opt;
return $s;
}
sub _validateRunStruct {
my ($self, $s) = @_;
# command?
$self->error('Undefined command.') and return
unless defined $s->{cmd};
view all matches for this distributionview release on metacpan - search on metacpan
view release on metacpan or search on metacpan
t/columns.t
t/concurrent.t
t/database_class.t
t/encoding_file.t
t/encoding_table.t
t/import_validate.t
t/low_priority.t
t/no_apply.t
t/non_blocking.t
t/options_validate.t
t/partition.t
t/pp.t
t/promise.t
t/replace_ignore.t
t/rows.t
view all matches for this distributionview release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/MojoMojo/Controller/Attachment.pm view on Meta::CPAN
$c->res->output( $io_file );
$c->res->header( 'content-type', $att->contenttype );
$c->res->header(
"Content-Disposition" => "inline; filename=" . URI::Escape::uri_escape_utf8( $att->name ) );
$c->res->header( 'Cache-Control', 'max-age=86400, must-revalidate' );
}
=head2 download
Forwards to L</view> then forces the attachment to be downloaded
lib/MojoMojo/Controller/Attachment.pm view on Meta::CPAN
$io_file->binmode;
$c->res->output( $io_file );
$c->res->header( 'content-type', $att->contenttype );
$c->res->header( "Content-Disposition" => "inline; filename=" . URI::Escape::uri_escape_utf8( $att->name ) );
$c->res->header( 'Cache-Control', 'max-age=86400, must-revalidate' );
}
=head2 inline
lib/MojoMojo/Controller/Attachment.pm view on Meta::CPAN
$c->res->output( $io_file );
$c->res->header( 'content-type', $c->stash->{att}->contenttype );
$c->res->header(
"Content-Disposition" => "inline; filename=" . URI::Escape::uri_escape_utf8( $c->stash->{att}->name ) );
$c->res->header( 'Cache-Control', 'max-age=86400, must-revalidate' );
}
=head2 delete
view all matches for this distributionview release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/MojoX/Authentication.pm view on Meta::CPAN
my $authn = $self->model;
# add Mojolicious::Plugin::Authentication with the "right" callbacks
$app->plugin( Authentication => {
load_user => sub (@args) { $authn->load_user(@args) },
validate_user => sub (@args) { $authn->validate_user(@args) },
});
# set a hook to set the user's data in the stash, associated to the
# requested user_stash_key. This stash key is always set anyway, to
# avoid errors in the templates in case it's missing
lib/MojoX/Authentication.pm view on Meta::CPAN
my $saml2 = $self->_get_provider($c);
my $user = $saml2->parse_assertion($saml_id, $saml_response);
my $uid = $user->{$saml2->user_key};
# we're not using credentials here, so "username" and "password" do
# not make sense. We use "auto_validate" instead and skip
# validate_user altogether
$c->authenticate(undef, undef, { auto_validate => $uid });
$c->log->info("login successful (SAML2): $uid");
$c->flash(message => [ info => "Welcome, $user->{fullname}" ]);
$c->redirect_to($self->_route_for($route_for, 'ok'));
}
catch {
view all matches for this distributionview release on metacpan - search on metacpan