The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Mojolicious::Plugin::SslAuth - SSL client certificate auth helper

DESCRIPTION

Mojolicous::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(
            sub {
                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)

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

Mojolicious

DEVELOPMENT

http://github.com/tempire/mojolicious-plugin-sslauth

VERSION

0.05

AUTHOR

Glen Hinkle tempire@cpan.org