Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Mojolicious::Plugin::SSLAuth
Perl Perl6
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib/Mojolicious/Plugin
t
.gitignore
.travis.yml
Changes
Mojolicious-Plugin-SslAuth-0.08.tar.gz
README.pod
dist.ini

README.pod

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

    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 < 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

Mojolicious

DEVELOPMENT

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

VERSION

0.07

AUTHOR

Glen Hinkle tempire@cpan.org

Something went wrong with that request. Please try again.