Skip to content

Instantly share code, notes, and snippets.

@cfedde
Created February 10, 2014 20:34
Show Gist options
  • Save cfedde/8923656 to your computer and use it in GitHub Desktop.
Save cfedde/8923656 to your computer and use it in GitHub Desktop.
#!/opt/bcv/bin/perl
use Mojolicious::Lite;
plugin 'basic_auth';
get '/' => sub {
my $self = shift;
return $self->render_text('ok')
if $self->basic_auth(
realm => sub {
warn "@_";
return 1 if "@_" eq 'username password'
}
);
};
app->secret('check cgi for the rest of us');
app->start;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment