<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">=head1 NAME

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

=head1 DESCRIPTION

L&lt;Mojolicous::Plugin::SslAuth&gt; is a helper for authenticating client ssl certificates against CA's (certificate authorities)

=head1 USAGE

    use Mojolicious::Lite;

    plugin 'ssl_auth';

    get '/' =&gt; sub {
        my $self = shift;

        return $self-&gt;render_text('ok')
          if $self-&gt;ssl_auth(
            sub {
                return 1 if shift-&gt;peer_certificate('commonName') eq 'client';
            }
          );
    };

    app-&gt;start;

L&lt;IO::Socket::SSL&gt; connection passed as parameter.

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

B&lt;NOTE&gt; For Mojolicious versions &lt; 1.13, use Mojolicious::Plugin::SslAuth 0.02

=head1 METHODS

L&lt;Mojolicious::Plugin::SslAuth&gt; inherits all methods from
L&lt;Mojolicious::Plugin&gt; and implements the following new ones.

=head2 C&lt;register&gt;

    $plugin-&gt;register;

Register condition in L&lt;Mojolicious&gt; application.

=head1 SEE ALSO

L&lt;Mojolicious&gt;

=head1 DEVELOPMENT

L&lt;http://github.com/tempire/mojolicious-plugin-sslauth&gt;

=head1 VERSION

0.04

=head1 AUTHOR

Glen Hinkle tempire@cpan.org

=cut
</pre></body></html>