NAME
Mojolicious::Plugin::SslAuth - SSL client certificate auth helper
DESCRIPTION
Mojolicious::Plugin::SslAuth is a helper for authenticating client ssl certificates against CA's (certificate authorities)
USAGE
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'
}
);
$self
->render_text(
'commonName not matched'
);
};
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)
- Older versions of Mojolicious
-
For Mojolicious versions >= 5.0, use Mojolicious::Plugin::SslAuth 0.08
For Mojolicious versions < 2.81, use Mojolicious::Plugin::SslAuth 0.05
For Mojolicious versions < 1.13, use Mojolicious::Plugin::SslAuth 0.02
METHODS
Mojolicious::Plugin::SslAuth inherits all methods from Mojolicious::Plugin and implements the following new ones.
register
$plugin
->register;
Register condition in Mojolicious application.
SEE ALSO
DEVELOPMENT
http://github.com/tempire/mojolicious-plugin-sslauth
VERSION
0.08
AUTHOR
Glen Hinkle tempire@cpan.org
CONTRIBUTORS
reneeb