Dancer::Plugin::Auth::RBAC::Credentials::Config(3)

NAME
Dancer::Plugin::Auth::RBAC::Credentials::Config - Dancer::Plugin::Auth::RBAC authentication via the Dancer configuration file!

VERSION
version 1.110720

SYNOPSIS
    # in your app code
    my $auth = auth($login, $password);
    if ($auth) {
        # login successful
    }

    # use your own encryption (if the user account password is encrypted)
    my $auth = auth($login, encrypt($password));
    if ($auth) {
        # login successful
    }

DESCRIPTION
Dancer::Plugin::Auth::RBAC::Credentials::Config uses your Dancer application configuration file as the application's user management system.

METHODS

  authorize
The authorize method (found in every authentication class) validates a user against the defined datastore using the supplied arguments and configuration file options.

CONFIGURATION
    plugins:
      Auth::RBAC:
        credentials:
          class: Config
          options:
            accounts:
              user01:
                name: Joe Schmoe
                password: foobar
                roles:
                  - guest
                  - user
              user02:
                name: Jacque Fock
                password: barbaz
                roles:
                  - admin

AUTHOR
  Al Newkirk <awncorp@cpan.org>

COPYRIGHT AND LICENSE
This software is copyright (c) 2010 by awncorp.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.