Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Digest authentication middleware for Plack

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 t
Octocat-spinner-32 xt
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .shipit
Octocat-spinner-32 Changes
Octocat-spinner-32 MANIFEST
Octocat-spinner-32 MANIFEST.SKIP
Octocat-spinner-32 Makefile.PL
Octocat-spinner-32 README
README
NAME
    Plack::Middleware::Auth::Digest - Digest authentication

SYNOPSIS
      enable "Auth::Digest", realm => "Secured", secret => "blahblahblah",
          authenticator => sub {
              my $username = shift;
              return $password; # for $username
          };

      # Or return MD5 hash of "$username:$realm:$password"
      enable "Auth::Digest", realm => "Secured", secret => "blahblahblah",
          password_hashed => 1,
          authenticator => sub { return $password_hashed };

DESCRIPTION
    Plack::Middleware::Auth::Digest is a Plack middleware component that
    enables Digest authentication. Your "authenticator" callback is given an
    username as a string and should return a password, either as a raw
    password or a hashed password.

CONFIGURATIONS
    authenticator
        A callback that takes an username and returns a password for the
        user, either in a plaintext password or a MD5 hash of
        "username:realm:password" (quotes not included) when
        "password_hashed" option is enabled.

    password_hashed
        A boolean (0 or 1) to indicate whether "authenticator" callback
        returns passwords in a plaintext or hashed. Defaults to 0
        (plaintext).

    realm
        A string to represent the realm. Defaults to *restricted area*.

    secret
        Server secret text string that is used to sign nonce. Required.

    nonce_ttl
        Time-to-live seconds to prevent replay attacks. Defaults to 60.

AUTHOR
    Yuji Shimada <xaicron@cpan.org>

    Tatsuhiko Miyagawa

SEE ALSO
    Plack::Middleware::Auth::Basic

LICENSE
    This library is free software; you can redistribute it and/or modify it
    under the same terms as Perl itself.

Something went wrong with that request. Please try again.