Result:
found 99 distributions and 284 files matching your query ! ( run in 2.485 )


Mojolicious-Plugin-InputValidation

 view release on metacpan or  search on metacpan

lib/Mojolicious/Plugin/InputValidation.pm  view on Meta::CPAN

        return 0;
    }

    if ($self->{of}) {
        for (my $i = 0; $i < ($self->{max} // $elems); $i++) {
            my $err = Mojolicious::Plugin::InputValidation::_validate_structure($value->[$i], $self->{of}, "$path/$i");

            if ($err) {
                $self->error($err);
                return 0;
            }
        }
    }
    elsif ($self->{pattern} && !$self->{min} && !$self->{min}) {
        for (my $i = 0; $i < scalar @{$self->{pattern}}; $i++) {
            my $err = Mojolicious::Plugin::InputValidation::_validate_structure($value->[$i], $self->{pattern}[$i], "$path/$i");

            if ($err) {
                $self->error($err);
                return 0;
            }

lib/Mojolicious/Plugin/InputValidation.pm  view on Meta::CPAN

        $self->error(sprintf("Missing keys '%s' at path %s", join(',', @missing), $path || '/'));
        return 0;
    }

    for my $key (grep { $have_keys{$_} } @want_keys) {
        my $err = Mojolicious::Plugin::InputValidation::_validate_structure($value->{$key}, $self->{pattern}{$key}, "$path/$key");

        if ($err) {
            $self->error($err);
            return 0;
        }

lib/Mojolicious/Plugin/InputValidation.pm  view on Meta::CPAN

}

sub register {
    my ($self, $app, $conf) = @_;

    $app->helper(validate_json_request => sub {
        my ($c, $pattern) = @_;
        return _validate_structure($c->req->json, $pattern);
    });
    $app->helper(validate_params => sub {
        my ($c, $pattern) = @_;
        return _validate_structure($c->params, $pattern);
    });
    $app->helper(validate_structure => sub {
        my ($c, $structure, $pattern) = @_;
        return _validate_structure($structure, $pattern);
    });
}

sub _validate_structure {
    my ($input, $pattern, $path) = @_;

    if (ref $pattern eq 'HASH') {
        $pattern = iv_object($pattern);
    }

lib/Mojolicious/Plugin/InputValidation.pm  view on Meta::CPAN


  post '/books' => sub {
      my $c = shift;

      # Validate incoming requests against our data model.
      if (my $error = $c->validate_json_request({
          title    => iv_any,
          abstract => iv_any(optional => 1, empty => 1),
          author   => {
              firstname => iv_word,
              lastname  => iv_word,

lib/Mojolicious/Plugin/InputValidation.pm  view on Meta::CPAN

=head1 METHODS

L<Mojolicious::Plugin::InputValidation> adds methods to the connection object
in a mojolicous controller. This way input validation becomes easy.

=head2 validate_json_request

  my $error = $c->validate_json_request($pattern);

This method try to match the json request payload ($c->req->json) against the
given pattern. If the payload matches, a false value is returned. If the payload
on the other hand does not match the pattern, the first non-matching value is
returned along with a speaking error message. The error message could look like:

 view all matches for this distribution
 view release on metacpan -  search on metacpan

Mojolicious-Plugin-Kinde

 view release on metacpan or  search on metacpan

lib/Mojolicious/Plugin/Kinde.pm  view on Meta::CPAN

	$self->jwt( Mojo::JWT->new( jwks => $jwks_keys ) );

	$self->iss( $conf->{iss}           || $app->config->{kinde}->{iss} );
	$self->audience( $conf->{audience} || $app->config->{kinde}->{audience} );

	$app->helper( get_kinde_claims => sub { _validate_auth_header( $self, @_ ) } );

	$app->routes->add_condition( kinde_auth => sub { _validate_route( $self, @_ ) } );

} ## end sub register

sub _validate {
	my ( $self, $c, $token ) = @_;

	if ($token) {
		my $token_data = $token ? $self->jwt->decode($token) : undef;

lib/Mojolicious/Plugin/Kinde.pm  view on Meta::CPAN


		return undef;

	} ## end if ($token)

} ## end sub _validate

sub _validate_auth_header {
	my ( $self, $c ) = @_;

	my $headers = $c->req->headers;
	my $auth    = $headers->header('Authorization');
	my $token   = $auth ? ( split( ' ', $auth ) )[1] : undef;

	return $self->_validate( $c, $token );

} ## end sub _validate_auth_header

sub _validate_route {
	my ( $self, $route, $c, $captures, $arg ) = @_;

	my $headers = $c->req->headers;
	my $auth    = $headers->header('Authorization');
	my $token   = $auth ? ( split( ' ', $auth ) )[1] : undef;

	return $self->_validate( $c, $token ) ? 1 : 0;

} ## end sub _validate_route


1;

=pod

 view all matches for this distribution
 view release on metacpan -  search on metacpan

Mojolicious-Plugin-Leafletjs

 view release on metacpan or  search on metacpan

share/public/leaflet.js  view on Meta::CPAN

/*
 Leaflet, a JavaScript library for mobile-friendly interactive maps. http://leafletjs.com
 (c) 2010-2013, Vladimir Agafonkin
 (c) 2010-2011, CloudMade
*/
!function(t,e,i){var n=t.L,o={};o.version="0.6.4","object"==typeof module&&"object"==typeof module.exports?module.exports=o:"function"==typeof define&&define.amd&&define(o),o.noConflict=function(){return t.L=n,this},t.L=o,o.Util={extend:function(t){v...
},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){this._container.parentNode.removeChild(this._container),t.off({viewreset:this._reset,moveend:this._update},this),this._animated&&t.off({zoomanim:this._animateZoom,zoomend:this._en...
o.DomUtil.addClass(t,"leaflet-vml-shape"),this.options.clickable&&o.DomUtil.addClass(t,"leaflet-clickable"),t.coordsize="1 1",this._path=this._createElement("path"),t.appendChild(this._path),this._map._pathRoot.appendChild(t)},_initStyle:function(){t...
},removeHooks:function(){o.DomEvent.off(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(o.DomEvent.preventDefault(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,clearTimeout(this._holdTim...

 view all matches for this distribution
 view release on metacpan -  search on metacpan

Mojolicious-Plugin-Materialize

 view release on metacpan or  search on metacpan

lib/Mojolicious/Plugin/Materialize/css/materialize.css  view on Meta::CPAN

  content: attr(data-error);
  color: #F44336;
  opacity: 1;
}

input:not([type]).validate + label,
input[type=text].validate + label,
input[type=password].validate + label,
input[type=email].validate + label,
input[type=url].validate + label,
input[type=time].validate + label,
input[type=date].validate + label,
input[type=datetime].validate + label,
input[type=datetime-local].validate + label,
input[type=tel].validate + label,
input[type=number].validate + label,
input[type=search].validate + label,
textarea.materialize-textarea.validate + label {
  width: 100%;
  pointer-events: none;
}

input:not([type]) + label:after,

lib/Mojolicious/Plugin/Materialize/css/materialize.css  view on Meta::CPAN

.input-field.col label {
  left: 0.75rem;
}

.input-field.col .prefix ~ label,
.input-field.col .prefix ~ .validate ~ label {
  width: calc(100% - 3rem - 1.5rem);
}

.input-field label {
  color: #9e9e9e;

lib/Mojolicious/Plugin/Materialize/css/materialize.css  view on Meta::CPAN

}

.input-field .prefix ~ input,
.input-field .prefix ~ textarea,
.input-field .prefix ~ label,
.input-field .prefix ~ .validate ~ label,
.input-field .prefix ~ .autocomplete-content {
  margin-left: 3rem;
  width: 92%;
  width: calc(100% - 3rem);
}

 view all matches for this distribution
 view release on metacpan -  search on metacpan

Mojolicious-Plugin-Memorize

 view release on metacpan or  search on metacpan

lib/Mojolicious/Plugin/Memorize.pm  view on Meta::CPAN

    = ref $_[0] eq 'HASH' ? (undef, shift) : (shift, shift || {});

  # Default name
  $name ||= join '', map { $_ || '' } (caller(1))[0 .. 3];

  # Return memorized result or invalidate cached
  return $mem->{$name}{content} if $self->_check_cached($name);

  # Determine new expiration time
  my $expires = 0;
  if ( my $delta = $args->{duration} ) {

 view all matches for this distribution
 view release on metacpan -  search on metacpan

Mojolicious-Plugin-MoreHelpers

 view release on metacpan or  search on metacpan

lib/Mojolicious/Plugin/MoreHelpers.pm  view on Meta::CPAN


    return is_ip $value ? undef : 1;
  });

  $app->validator->add_check(email_address => sub {
    my ($validate, $name, $value) = @_;

    my ($email) = Email::Address->parse($value);
    return defined $email && $email->address ? undef : 1;
  });
}

 view all matches for this distribution
 view release on metacpan -  search on metacpan

Mojolicious-Plugin-MySQLViewerLite

 view release on metacpan or  search on metacpan

lib/Mojolicious/Plugin/MySQLViewerLite/Base/Mysqlviewerlite.pm  view on Meta::CPAN

  my $rule = [
    database => {default => ''} => [
      'safety_name'
    ] 
  ];
  my $vresult = $plugin->validator->validate($params, $rule);
  my $database = $vresult->data->{database};
  my $tables = $command->show_tables($database);
  
  return $self->render(
    database => $database,

lib/Mojolicious/Plugin/MySQLViewerLite/Base/Mysqlviewerlite.pm  view on Meta::CPAN

    ],
    table => {default => ''} => [
      'safety_name'
    ]
  ];
  my $vresult = $plugin->validator->validate($params, $rule);
  my $database = $vresult->data->{database};
  my $table = $vresult->data->{table};
  
  my $table_def = $command->show_create_table($database, $table);

lib/Mojolicious/Plugin/MySQLViewerLite/Base/Mysqlviewerlite.pm  view on Meta::CPAN

  my $rule = [
    database => {default => ''} => [
      'safety_name'
    ]
  ];
  my $vresult = $plugin->validator->validate($params, $rule);
  my $database = $vresult->data->{database};
  my $tables = $command->show_tables($database);
  
  # Get create tables
  my $create_tables = {};

lib/Mojolicious/Plugin/MySQLViewerLite/Base/Mysqlviewerlite.pm  view on Meta::CPAN

  my $rule = [
    database => {default => ''} => [
      'safety_name'
    ]
  ];
  my $vresult = $plugin->validator->validate($params, $rule);
  my $database = $vresult->data->{database};
  my $tables = $command->show_tables($database);
  
  $self->render(
    database => $database,

lib/Mojolicious/Plugin/MySQLViewerLite/Base/Mysqlviewerlite.pm  view on Meta::CPAN

  my $rule = [
    database => {default => ''} => [
      'safety_name'
    ],
  ];
  my $vresult = $plugin->validator->validate($params, $rule);
  my $database = $vresult->data->{database};
  
  # Get primary keys
  my $primary_keys = $command->show_primary_keys($database);
  

lib/Mojolicious/Plugin/MySQLViewerLite/Base/Mysqlviewerlite.pm  view on Meta::CPAN

  my $rule = [
    database => {default => ''} => [
      'safety_name'
    ],
  ];
  my $vresult = $plugin->validator->validate($params, $rule);
  my $database = $vresult->data->{database};
  
  # Get null allowed columns
  my $null_allowed_columns = $command->show_null_allowed_columns($database);
  

lib/Mojolicious/Plugin/MySQLViewerLite/Base/Mysqlviewerlite.pm  view on Meta::CPAN

    ],
    condition_value => [
      'not_blank'
    ]
  ];
  my $vresult = $plugin->validator->validate($params, $rule);
  my $database = $vresult->data->{database};
  my $table = $vresult->data->{table};
  
  # Where
  my $column = $vresult->data->{condition_column};

 view all matches for this distribution
 view release on metacpan -  search on metacpan

Mojolicious-Plugin-Notifications

 view release on metacpan or  search on metacpan

lib/Mojolicious/Plugin/Notifications/Alertify.pm  view on Meta::CPAN

In case an C<ok_label> is passed, this will be the label
for the confirmation button.
In case a C<cancel_label> is passed, this will be the label
for the cancelation button.
The POST will have a L<csrf_token|Mojolicious::Plugin::TagHelpers/csrf_token>
parameter to validate.

B<Confirmation is EXPERIMENTAL!>


=head2 notifications

lib/Mojolicious/Plugin/Notifications/Alertify.pm  view on Meta::CPAN

a confirmation notification is used.

If the first parameter is a L<Mojolicious::Controller> object,
and the notification is a confirmation, the requests will have
a L<csrf_token|Mojolicious::Plugin::TagHelpers/csrf_token>
parameter to validate.

B<Confirmation is EXPERIMENTAL!>


=head1 SEE ALSO

 view all matches for this distribution
 view release on metacpan -  search on metacpan

Mojolicious-Plugin-OAuth2-Server

 view release on metacpan or  search on metacpan

lib/Mojolicious/Plugin/OAuth2/Server.pm  view on Meta::CPAN

  unless ( my $oauth_details = $c->oauth( @scopes ) ) {
    return $c->render( status => 401, text => 'Unauthorized' );
  }

This calls the L<Net::OAuth2::AuthorizationServer::AuthorizationCodeGrant>
module (C<verify_token_and_scope> method) to validate the access/refresh token.

=head2 oauth2_auth_request

This is a helper to allow you get get the redirect URI instead of directing
a user to the authorize_route - it requires the details of the client:

 view all matches for this distribution
 view release on metacpan -  search on metacpan

Mojolicious-Plugin-OpenAPI-Modern

 view release on metacpan or  search on metacpan

lib/Mojolicious/Plugin/OpenAPI/Modern.pm  view on Meta::CPAN

    die 'Cannot load OpenAPI document: ', $e;
  }

  $app->helper(openapi => sub ($) { $stash->{openapi} });

  $app->helper(validate_request => \&_validate_request);
  $app->helper(validate_response => \&_validate_response);

  $app->hook(after_dispatch => sub ($c) {
    $c->res->on(finish => sub ($res) { $config->{after_response}->($c) });
  }) if $config->{after_response};
}

lib/Mojolicious/Plugin/OpenAPI/Modern.pm  view on Meta::CPAN

    openapi_uri    => $config->{document_uri} // $config->{document_filename} // '',
    openapi_schema => $schema,
  };
}

sub _validate_request ($c) {
  my $options = $c->stash->{openapi} //= {};
  return $c->openapi->validate_request($c->req, $options);
}

sub _validate_response ($c) {
  my $options = $c->stash->{openapi} //= {};
  local $options->{request} = $c->req;
  return $c->openapi->validate_response($c->res, $options);
}

1;

__END__

lib/Mojolicious/Plugin/OpenAPI/Modern.pm  view on Meta::CPAN

  });

  $app->plugin('OpenAPI::Modern', $app->config->{openapi});

  # in a controller...
  my $result = $c->openapi->validate_request($c->req);

=head1 DESCRIPTION

This L<Mojolicious> plugin makes an L<OpenAPI::Modern> object available to the application.

lib/Mojolicious/Plugin/OpenAPI/Modern.pm  view on Meta::CPAN

A subref which runs after the response has been finalized, to allow you to perform validation on it.
You B<must not> mutate the response here, nor swap it out for a different response, so use this only
for telemetry and logging.

  my $after_response = sub ($c) {
    my $result = $c->validate_response;
    if ($result->valid) {
      $c->log->debug('response is valid');
    }
    else {
      # see JSON::Schema::Modern::Result for different output formats

lib/Mojolicious/Plugin/OpenAPI/Modern.pm  view on Meta::CPAN


=head2 openapi

The L<OpenAPI::Modern> object; it holds your OpenAPI specification and is reused between requests.

=head2 validate_request

  my $result = $c->openapi->validate_request;

Passes C<< $c->req >> to L<OpenAPI::Modern/validate_request> and returns a
L<JSON::Schema::Modern::Result> object.

Note that the matching L<Mojo::Routes::Route> object for this request is I<not> used to find the
OpenAPI path-item that corresponds to this request: only information in the request URI itself is
used (although some information in the route may be used in future features).

You might want to define an C<under> route action that calls C<validate_request> and short-circuits
with an HTTP 400 response on validation failure.

=head2 validate_response

  my $result = $c->openapi->validate_response;

Passes C<< $c->res >> and C<< $c->req >> to L<OpenAPI::Modern/validate_response> and returns a
L<JSON::Schema::Modern::Result> object.

As this can only be called in the parts of the dispatch flow where the response has already been
rendered and finalized, a hook has been set up for you; you can access it by providing a subref to the
L</after_response> configuration value:

  $app->config->{openapi}{after_response} //= sub ($c) {
    my $result = $c->validate_response;
    # ... do something with the validation result
  };

Note that the matching L<Mojo::Routes::Route> object for this request is I<not> used to find the
OpenAPI path-item that corresponds to this request and response: only information in the request URI

 view all matches for this distribution
 view release on metacpan -  search on metacpan

Mojolicious-Plugin-OpenAPI

 view release on metacpan or  search on metacpan

lib/Mojolicious/Plugin/OpenAPI.pm  view on Meta::CPAN

  die @$errors if @$errors;

  unless ($app->defaults->{'openapi.base_paths'}) {
    $app->helper('openapi.spec'        => \&_helper_get_spec);
    $app->helper('openapi.valid_input' => \&_helper_valid_input);
    $app->helper('openapi.validate'    => \&_helper_validate);
    $app->helper('reply.openapi'       => \&_helper_reply);
    $app->hook(before_render => \&_before_render);
    $app->renderer->add_handler(openapi => \&_render);
  }

lib/Mojolicious/Plugin/OpenAPI.pm  view on Meta::CPAN

}

sub _helper_valid_input {
  my $c = shift;
  return undef if $c->res->code;
  return $c unless my @errors = _helper_validate($c);
  $c->stash(status => 400)
    ->render(data => $c->openapi->build_response_body({errors => \@errors, status => 400}));
  return undef;
}

sub _helper_validate {
  my $c      = shift;
  my $self   = _self($c);
  my @errors = $self->validator->validate_request([@{$c->stash}{qw(openapi.method openapi.path)}],
    $c->openapi->build_schema_request);
  $c->openapi->coerce_request_parameters(
    delete $c->stash->{'openapi.evaluated_request_parameters'});
  return @errors;
}

lib/Mojolicious/Plugin/OpenAPI.pm  view on Meta::CPAN

  delete $args->{encoding};
  $args->{status} = $status;
  $stash->{format} ||= 'json';

  if ($op_spec) {
    @errors = $self->validator->validate_response($method_path_status,
      $c->openapi->build_schema_response);
    $c->openapi->coerce_response_parameters(
      delete $stash->{'openapi.evaluated_response_parameters'});
    $args->{status} = $errors[0]->path eq '/header/Accept' ? 400 : 500 if @errors;
  }

lib/Mojolicious/Plugin/OpenAPI.pm  view on Meta::CPAN

        }
      }
    }
  }

=head2 openapi.validate

  @errors = $c->openapi->validate;

Used to validate a request. C<@errors> holds a list of
L<JSON::Validator::Error> objects or empty list on valid input.

Note that this helper is only for customization. You probably want
L</openapi.valid_input> in most cases.

lib/Mojolicious/Plugin/OpenAPI.pm  view on Meta::CPAN

This hook is EXPERIMENTAL and subject for change.

=head1 RENDERER

This plugin register a new handler called C<openapi>. The special thing about
this handler is that it will validate the data before sending it back to the
user agent. Examples:

  $c->render(json => {foo => 123});    # without validation
  $c->render(openapi => {foo => 123}); # with validation

lib/Mojolicious/Plugin/OpenAPI.pm  view on Meta::CPAN

=head2 register

  $openapi = $openapi->register($app, \%config);
  $openapi = $app->plugin(OpenAPI => \%config);

Loads the OpenAPI specification, validates it and add routes to
L<$app|Mojolicious>. It will also set up L</HELPERS> and adds a
L<before_render|Mojolicious/before_render> hook for auto-rendering of error
documents. The return value is the object instance, which allow you to access
the L</ATTRIBUTES> after you load the plugin.

 view all matches for this distribution
 view release on metacpan -  search on metacpan

Mojolicious-Plugin-Passphrase

 view release on metacpan or  search on metacpan

lib/Mojolicious/Plugin/Passphrase.pm  view on Meta::CPAN

}

1;


#ABSTRACT: Securely hash and validate your passwords.

__END__

=pod

=encoding UTF-8

=head1 NAME

Mojolicious::Plugin::Passphrase - Securely hash and validate your passwords.

=head1 VERSION

version 0.003

 view all matches for this distribution
 view release on metacpan -  search on metacpan

Mojolicious-Plugin-PetalTinyRenderer

 view release on metacpan or  search on metacpan

lib/Mojolicious/Plugin/PetalTinyRenderer.pm  view on Meta::CPAN

    catch {
        my $validator;
        eval "use XML::Validate; \$validator = XML::Validate->new(Type => 'LibXML');";
        if ($validator) {
            $xml =~ s/<!DOCTYPE.*?>//;
            if ($validator->validate($xml)) {
                die "Petal::Tiny blew up handling '$name', and XML::Validate reports the XML is fine.\n\n$_";
            }
            else {
                my $e       = $validator->last_error;
                my $message = $e->{message} // "";

 view all matches for this distribution
 view release on metacpan -  search on metacpan

Mojolicious-Plugin-Pingen

 view release on metacpan or  search on metacpan

LICENSE  view on Meta::CPAN

    License to anyone who comes into possession of a copy.  This
    License will therefore apply, along with any applicable section 7
    additional terms, to the whole of the work, and all its parts,
    regardless of how they are packaged.  This License gives no
    permission to license the work in any other way, but it does not
    invalidate such permission if you have separately received it.

    d) If the work has interactive user interfaces, each must display
    Appropriate Legal Notices; however, if the Program has interactive
    interfaces that do not display Appropriate Legal Notices, your
    work need not make them do so.

 view all matches for this distribution
 view release on metacpan -  search on metacpan

Mojolicious-Plugin-PlackMiddleware

 view release on metacpan or  search on metacpan

xt/compat/dispatcher_lite_app.t  view on Meta::CPAN

};

# Set additional headers for static files
hook after_static => sub {
  my $c = shift;
  $c->res->headers->cache_control('max-age=3600, must-revalidate');
};

# Make controller available as $_
hook around_action => sub {
  my ($next, $c) = @_;

xt/compat/dispatcher_lite_app.t  view on Meta::CPAN


my $t = Test::Mojo->new;

# Normal route
$t->get_ok('/')->status_is(200)
  ->header_isnt('Cache-Control' => 'max-age=3600, must-revalidate')
  ->content_is('works');

# Normal static file
$t->get_ok('/test.txt')->status_is(200)
  ->header_is('Cache-Control' => 'max-age=3600, must-revalidate')
  ->content_is("Normal static file!\n");

# Override static file
$t->get_ok('/hello.txt')->status_is(200)
  ->content_is('Custom static file works!');

xt/compat/dispatcher_lite_app.t  view on Meta::CPAN

# Custom dispatcher
$t->get_ok('/custom?a=works+too')->status_is(205)->content_is('works too');

# Static file
$t->get_ok('/res.txt')->status_is(200)
  ->header_is('Cache-Control' => 'max-age=3600, must-revalidate')
  ->content_is("Static response!\n");

# Custom response
$t->get_ok('/res.txt?route=1')->status_is(202)
  ->header_isnt('Cache-Control' => 'max-age=3600, must-revalidate')
  ->content_is('Custom response!');

# Conditional response
$t->get_ok('/res.txt?route=1&res=1')->status_is(201)
  ->header_isnt('Cache-Control' => 'max-age=3600, must-revalidate')
  ->content_is('Conditional response!');

# Another custom dispatcher
$t->get_ok('/custom_too')->status_is(200)
  ->header_isnt('Cache-Control' => 'max-age=3600, must-revalidate')
  ->content_is('this works too');

# First wrapper
$t->get_ok('/wrap')->status_is(200)->content_is('Wrapped!');

 view all matches for this distribution
 view release on metacpan -  search on metacpan

Mojolicious-Plugin-QuickPg

 view release on metacpan or  search on metacpan

lib/Mojolicious/Plugin/QuickPg.pm  view on Meta::CPAN

                                   foto => 'https://www.flickr.com/search/?text=Moscow' } );
  # or you can do like this
  
  my $params = $c->req->json;
  
  # Do not forget to validate $params before it:
  
  my $id = $c->insert('models', $params);
  
  # quick update
  # returns numbers of updated rows

 view all matches for this distribution
 view release on metacpan -  search on metacpan

Mojolicious-Plugin-ReCAPTCHAv2

 view release on metacpan or  search on metacpan

lib/Mojolicious/Plugin/ReCAPTCHAv2.pm  view on Meta::CPAN

that requires human interaction. The interaction is evaluated on a server
(via AJAX) and a dynamic parameter is injected in your form.
When your users submit your form to your server you receive that parameter
and can verify it by sending it to the captcha servers in the background.
You should then stop further processing of the request you received if the
captcha did not validate.

Please note that this module currently does not support some advanced usage
models for the captcha like explicit rendering and AJAX callbacks.
Therefore a few options listed in the official Google docs are not listed
above.

 view all matches for this distribution
 view release on metacpan -  search on metacpan

Mojolicious-Plugin-RevealJS

 view release on metacpan or  search on metacpan

share/public/revealjs/plugin/highlight/highlight.js  view on Meta::CPAN

	}
})();
// END CUSTOM REVEAL.JS INTEGRATION

/*! highlight.js v9.11.0 | BSD3 License | git.io/hljslicense */
!function(e){var n="object"==typeof window&&window||"object"==typeof self&&self;"undefined"!=typeof exports?e(exports):n&&(n.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return n.hljs}))}(function(e){function n(e){return e.r...
c:[{cN:"comment",b:/\(\*/,e:/\*\)/},e.ASM,e.QSM,e.CNM,{b:/\{/,e:/\}/,i:/:/}]}});hljs.registerLanguage("roboconf",function(a){var e="[a-zA-Z-_][^\\n{]+\\{",n={cN:"attribute",b:/[a-zA-Z-_]+/,e:/\s*:/,eE:!0,starts:{e:";",r:0,c:[{cN:"variable",b:/\.[a-zA...

 view all matches for this distribution
 view release on metacpan -  search on metacpan

Mojolicious-Plugin-RoutesAuthDBI

 view release on metacpan or  search on metacpan

lib/Mojolicious/Plugin/RoutesAuthDBI.pm  view on Meta::CPAN

  {
  auth => {
    stash_key => PKG."__user__",
    current_user_fn => 'auth_user',# helper
    load_user => \&load_user,
    validate_user => \&validate_user,
  },
  
  access => {
    namespace => PKG,
    module => 'Access',

lib/Mojolicious/Plugin/RoutesAuthDBI.pm  view on Meta::CPAN

      shift->render(status => 401, format=>'txt', text=>"Please sign in.\n");
    },
    fail_access_cb => sub {
      shift->render(status => 403, format=>'txt', text=>"You don`t have access on this route (url, action).\n");
    },
    import => [qw(load_user validate_user)],
  },
  
  admin => {
    namespace => PKG,
    controller => 'Admin',

lib/Mojolicious/Plugin/RoutesAuthDBI.pm  view on Meta::CPAN

    #~ autoload_user => 1,
    session_key => 'guest_data',
    stash_key => PKG."__guest__",
    #~ current_user_fn => 'current_guest',# helper
    #~ load_user => \&load_guest,
    #~ validate_user => not need
    #~ fail_render => not need
    #######end Mojolicious::Plugin::Authentication conf#######
    namespace => PKG,
    module => 'Guest',
    #~ import => [qw(load_guest)],

lib/Mojolicious/Plugin/RoutesAuthDBI.pm  view on Meta::CPAN

  stash_key => "Mojolicious::Plugin::RoutesAuthDBI__user__",
    
The options:

  load_user => \&load_user,
  validate_user => \&validate_user,

are imported from package access module. See below.

=head3 access

 view all matches for this distribution
 view release on metacpan -  search on metacpan

Mojolicious-Plugin-SQLiteViewerLite

 view release on metacpan or  search on metacpan

lib/Mojolicious/Plugin/SQLiteViewerLite/Base/Sqliteviewerlite.pm  view on Meta::CPAN

  my $rule = [
    database => {default => ''} => [
      'safety_name'
    ] 
  ];
  my $vresult = $plugin->validator->validate($params, $rule);
  my $database = $vresult->data->{database};
  my $tables = $command->show_tables($database);
  
  return $self->render(
    database => $database,

lib/Mojolicious/Plugin/SQLiteViewerLite/Base/Sqliteviewerlite.pm  view on Meta::CPAN

    ],
    table => {default => ''} => [
      'safety_name'
    ]
  ];
  my $vresult = $plugin->validator->validate($params, $rule);
  my $database = $vresult->data->{database};
  my $table = $vresult->data->{table};
  
  my $table_def = $command->show_create_table($database, $table);

lib/Mojolicious/Plugin/SQLiteViewerLite/Base/Sqliteviewerlite.pm  view on Meta::CPAN

  my $rule = [
    database => {default => ''} => [
      'safety_name'
    ]
  ];
  my $vresult = $plugin->validator->validate($params, $rule);
  my $database = $vresult->data->{database};
  my $tables = $command->show_tables($database);
  
  # Get create tables
  my $create_tables = {};

lib/Mojolicious/Plugin/SQLiteViewerLite/Base/Sqliteviewerlite.pm  view on Meta::CPAN

  my $rule = [
    database => {default => ''} => [
      'safety_name'
    ]
  ];
  my $vresult = $plugin->validator->validate($params, $rule);
  my $database = $vresult->data->{database};
  my $tables = $command->show_tables($database);
  
  $self->render(
    database => $database,

lib/Mojolicious/Plugin/SQLiteViewerLite/Base/Sqliteviewerlite.pm  view on Meta::CPAN

  my $rule = [
    database => {default => ''} => [
      'safety_name'
    ],
  ];
  my $vresult = $plugin->validator->validate($params, $rule);
  my $database = $vresult->data->{database};
  
  # Get primary keys
  my $primary_keys = $command->show_primary_keys($database);
  

lib/Mojolicious/Plugin/SQLiteViewerLite/Base/Sqliteviewerlite.pm  view on Meta::CPAN

  my $rule = [
    database => {default => ''} => [
      'safety_name'
    ],
  ];
  my $vresult = $plugin->validator->validate($params, $rule);
  my $database = $vresult->data->{database};
  
  # Get null allowed columns
  my $null_allowed_columns = $command->show_null_allowed_columns($database);
  

lib/Mojolicious/Plugin/SQLiteViewerLite/Base/Sqliteviewerlite.pm  view on Meta::CPAN

    ],
    condition_value => [
      'not_blank'
    ]
  ];
  my $vresult = $plugin->validator->validate($params, $rule);
  my $database = $vresult->data->{database};
  my $table = $vresult->data->{table};
  
  # Where
  my $column = $vresult->data->{condition_column};

 view all matches for this distribution
 view release on metacpan -  search on metacpan

Mojolicious-Plugin-SemanticUI

 view release on metacpan or  search on metacpan

lib/Mojolicious/public/vendor/SemanticUI/components/form.min.js  view on Meta::CPAN

 * Copyright 2014 Contributors
 * Released under the MIT license
 * http://opensource.org/licenses/MIT
 *
 */
!function(e,t,n,i){"use strict";e.fn.form=function(t,r){var o,a=e(this),s=e.extend(!0,{},e.fn.form.settings,r),l=e.extend({},e.fn.form.settings.defaults,t),c=s.namespace,u=s.metadata,d=s.selector,f=s.className,p=(s.error,"."+c),v="module-"+c,m=a.sele...

 view all matches for this distribution
 view release on metacpan -  search on metacpan

Mojolicious-Plugin-ServiceWorker

 view release on metacpan or  search on metacpan

lib/Mojolicious/Plugin/ServiceWorker.pm  view on Meta::CPAN

As above, except the matching URL will be fetched from the network
every time and used if possible. The cached value will only be used if
that fails.

B<Any URL not matching these three criteria> will be treated with a
"cache first" strategy, also known as "stale while revalidate": the cached
version will immediately by returned to the web client for performance,
but also fetched over the network and re-cached for freshness.

=head1 HELPERS

 view all matches for this distribution
 view release on metacpan -  search on metacpan

Mojolicious-Plugin-StaticCache

 view release on metacpan or  search on metacpan

lib/Mojolicious/Plugin/StaticCache.pm  view on Meta::CPAN

sub register {
    my ($self, $app, $conf) = @_;

    $conf->{even_in_dev}   ||= 0;
    $conf->{max_age}       ||= 2592000;
    $conf->{cache_control} ||= "max-age=$conf->{max_age}, must-revalidate";
    my $mode = $app->mode;
    my $edev = $conf->{even_in_dev};

    $app->hook(after_static => sub {
        my $c = shift;

lib/Mojolicious/Plugin/StaticCache.pm  view on Meta::CPAN

Default is 2592000.

=head2 cache_control

  # Mojolicious
  $self->plugin('StaticCache' => { cache_control => 'max-age=2592000, must-revalidate' });

Specify the content of the Cache-Control header.

Default is "max-age=$max_age, must-revalidate".

=head1 METHODS

L<Mojolicious::Plugin::StaticCache> inherits all methods from
L<Mojolicious::Plugin> and implements the following new ones.

 view all matches for this distribution
 view release on metacpan -  search on metacpan

Mojolicious-Plugin-Status

 view release on metacpan or  search on metacpan

lib/Mojolicious/Plugin/resources/public/mojo-status/bootstrap/bootstrap.css  view on Meta::CPAN

/*!
 * Bootstrap v4.4.1 (https://getbootstrap.com/)
 * Copyright 2011-2019 The Bootstrap Authors
 * Copyright 2011-2019 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 */:root{--blue:#007bff;--indigo:#6610f2;--purple:#6f42c1;--pink:#e83e8c;--red:#dc3545;--orange:#fd7e14;--yellow:#ffc107;--green:#28a745;--teal:#20c997;--cyan:#17a2b8;--white:#fff;--gray:#6c757d;--gray-dark:#343a40;--primary:#007bff;--secondary:#6c75...
/*# sourceMappingURL=bootstrap.min.css.map */

 view all matches for this distribution
 view release on metacpan -  search on metacpan

Mojolicious-Plugin-Sugar

 view release on metacpan or  search on metacpan

lib/Mojolicious/Plugin/Sugar.pm  view on Meta::CPAN


    # Shortcut to process HTML::FormHandler form 
    my $form = MyApp::Form::Add->new;
    $form->process( $self->params->to_hash );

    if ($form->validated) {
      [...]
    }
    else {
      [...]
    }

 view all matches for this distribution
 view release on metacpan -  search on metacpan

Mojolicious-Plugin-SwaggerUI

 view release on metacpan or  search on metacpan

share/resources/public/swagger-ui/swagger-ui-bundle.js  view on Meta::CPAN

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(function(){try{return require("esprima")}catch(e){}}()):"function"==typeof define&&define.amd?define(["esprima"],t):"object"==typeof exports?exports.SwaggerUIBundle=t(f...
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function()...
/*!
  Copyright (c) 2017 Jed Watson.
  Licensed under the MIT License (MIT), see
  http://jedwatson.github.io/classnames
*/

share/resources/public/swagger-ui/swagger-ui-bundle.js  view on Meta::CPAN

 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
 * @license  MIT
 */
var r=n(569),o=n(570),i=n(355);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null=...
/*!
 * @description Recursive object extending
 * @author Viacheslav Lotsmanov <lotsmanov89@gmail.com>
 * @license MIT
 *

share/resources/public/swagger-ui/swagger-ui-bundle.js  view on Meta::CPAN

 * @param {string} eventNameSuffix Event name, e.g. "click".
 * @param {?boolean} capture Check if the capture phase is supported.
 * @return {boolean} True if the event is supported.
 * @internal
 * @license Modernizr 3.0.0pre (Custom Build) | MIT
 */,e.exports=function(e,t){if(!o.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,i=n in document;if(!i){var a=document.createElement("div");a.setAttribute(n,"return;"),i="function"==typeof a[n]}return!i&&r&&"wheel"===e&&(i=docum...
/*!
 * https://github.com/Starcounter-Jack/JSON-Patch
 * (c) 2017 Joachim Wester
 * MIT license
 */
var n=this&&this.__extends||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);function r(){this.constructor=e}e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},r=Object.prototype.hasOwnProperty;function o(e,t){return ...
/** @license React v16.8.6
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):6010...
/*!
 * https://github.com/Starcounter-Jack/JSON-Patch
 * (c) 2017 Joachim Wester
 * MIT license
 */
var r=n(267),o=n(456),i=n(456);t.applyOperation=i.applyOperation,t.applyPatch=i.applyPatch,t.applyReducer=i.applyReducer,t.getValueByPointer=i.getValueByPointer,t.validate=i.validate,t.validator=i.validator;var a=n(267);t.JsonPatchError=a.PatchError,...
/*!
 * @description Recursive object extending
 * @author Viacheslav Lotsmanov <lotsmanov89@gmail.com>
 * @license MIT
 *

share/resources/public/swagger-ui/swagger-ui-bundle.js  view on Meta::CPAN

/*!
 * repeat-string <https://github.com/jonschlinkert/repeat-string>
 *
 * Copyright (c) 2014-2015, Jon Schlinkert.
 * Licensed under the MIT License.
 */var r,o="";e.exports=function(e,t){if("string"!=typeof e)throw new TypeError("expected a string");if(1===t)return e;if(2===t)return e+e;var n=e.length*t;if(r!==e||void 0===r)r=e,o="";else if(o.length>=n)return o.substr(0,n);for(;n>o.length&&t>1;)1...
/*!
 * Autolinker.js
 * 0.28.1
 *
 * Copyright(c) 2016 Gregory Jacobs <greg@greg-jacobs.com>
 * MIT License
 *
 * https://github.com/gregjacobs/Autolinker.js
 */o=[],void 0===(i="function"==typeof(r=function(){var e,t,n,r,o,i,a,s=function(e){e=e||{},this.version=s.version,this.urls=this.normalizeUrlsCfg(e.urls),this.email="boolean"!=typeof e.email||e.email,this.twitter="boolean"!=typeof e.twitter||e.twitt...
//# sourceMappingURL=swagger-ui-bundle.js.map

 view all matches for this distribution
 view release on metacpan -  search on metacpan

Mojolicious-Plugin-Tables

 view release on metacpan or  search on metacpan

LICENSE  view on Meta::CPAN

purpose whatsoever, including without limitation commercial, advertising or
promotional purposes (the "License"). The License shall be deemed effective as
of the date CC0 was applied by Affirmer to the Work. Should any part of the
License for any reason be judged legally invalid or ineffective under
applicable law, such partial invalidity or ineffectiveness shall not
invalidate the remainder of the License, and in such case Affirmer hereby
affirms that he or she will not (i) exercise any of his or her remaining
Copyright and Related Rights in the Work or (ii) assert any associated claims
and causes of action with respect to the Work, in either case contrary to
Affirmer's express Statement of Purpose.

 view all matches for this distribution
 view release on metacpan -  search on metacpan

Mojolicious-Plugin-Template-Mustache

 view release on metacpan or  search on metacpan

LICENSE  view on Meta::CPAN

    License to anyone who comes into possession of a copy.  This
    License will therefore apply, along with any applicable section 7
    additional terms, to the whole of the work, and all its parts,
    regardless of how they are packaged.  This License gives no
    permission to license the work in any other way, but it does not
    invalidate such permission if you have separately received it.

    d) If the work has interactive user interfaces, each must display
    Appropriate Legal Notices; however, if the Program has interactive
    interfaces that do not display Appropriate Legal Notices, your
    work need not make them do so.

 view all matches for this distribution
 view release on metacpan -  search on metacpan

Mojolicious-Plugin-Text-Caml

 view release on metacpan or  search on metacpan

LICENSE  view on Meta::CPAN

    License to anyone who comes into possession of a copy.  This
    License will therefore apply, along with any applicable section 7
    additional terms, to the whole of the work, and all its parts,
    regardless of how they are packaged.  This License gives no
    permission to license the work in any other way, but it does not
    invalidate such permission if you have separately received it.

    d) If the work has interactive user interfaces, each must display
    Appropriate Legal Notices; however, if the Program has interactive
    interfaces that do not display Appropriate Legal Notices, your
    work need not make them do so.

 view all matches for this distribution
 view release on metacpan -  search on metacpan

Mojolicious-Plugin-Toto

 view release on metacpan or  search on metacpan

lib/Mojolicious/Plugin/Toto/Assets/public/bootstrap/js/bootstrap.min.js  view on Meta::CPAN

/**
* Bootstrap.js v2.3.2 by @fat & @mdo
* Copyright 2012 Twitter, Inc.
* http://www.apache.org/licenses/LICENSE-2.0.txt
*/
!function(e){"use strict";e(function(){e.support.transition=function(){var e=function(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",tran...

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 2.485 seconds using v1.01-cache-2.11-cpan-0b5f733616e )