=head1 NAME

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

=head1 DESCRIPTION

L<Mojolicious::Plugin::SslAuth> is a helper for authenticating client ssl certificates against CA's (certificate authorities)

=head1 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'}
        );
    };

    app->start;

L<IO::Socket::SSL> connection passed as parameter.

See L<IO::Socket::SSL> for available methods. (You're most likely looking for ->peer_certificate and/or ->get_cipher)

=over

=item Older versions of Mojolicious

For Mojolicious versions < 2.81, use Mojolicious::Plugin::SslAuth 0.05

For Mojolicious versions < 1.13, use Mojolicious::Plugin::SslAuth 0.02

=back

=head1 METHODS

L<Mojolicious::Plugin::SslAuth> inherits all methods from
L<Mojolicious::Plugin> and implements the following new ones.

=head2 C<register>

    $plugin->register;

Register condition in L<Mojolicious> application.

=head1 SEE ALSO

L<Mojolicious>

=head1 DEVELOPMENT

L<http://github.com/tempire/mojolicious-plugin-sslauth>

=head1 VERSION

0.07

=head1 AUTHOR

Glen Hinkle tempire@cpan.org

=cut
