Mojolicious::Plugin::SslAuth - SSL client certificate auth helper
Mojolicious::Plugin::SslAuth is a helper for authenticating client ssl certificates against CA's (certificate authorities)
use Mojolicious::Lite; plugin 'ssl_auth'; get '/' => sub { my $self = shift; return $self->render_text('ok') if $self->ssl_auth( {return 1 if shift->peer_certificate('commonName') eq 'client'} ); }; app->start;
IO::Socket::SSL connection passed as parameter.
See IO::Socket::SSL for available methods. (You're most likely looking for ->peer_certificate and/or ->get_cipher)
For Mojolicious versions < 2.81, use Mojolicious::Plugin::SslAuth 0.05
For Mojolicious versions < 1.13, use Mojolicious::Plugin::SslAuth 0.02
Mojolicious::Plugin::SslAuth inherits all methods from Mojolicious::Plugin and implements the following new ones.
register
$plugin->register;
Register condition in Mojolicious application.
Mojolicious
http://github.com/tempire/mojolicious-plugin-sslauth
0.07
Glen Hinkle tempire@cpan.org
To install Mojolicious::Plugin::SslAuth, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojolicious::Plugin::SslAuth
CPAN shell
perl -MCPAN -e shell install Mojolicious::Plugin::SslAuth
For more information on module installation, please visit the detailed CPAN module installation guide.