Created
February 10, 2014 20:34
-
-
Save cfedde/8923656 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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