NAME

Dancer::Plugin::Authorize::Credentials::Config - Dancer::Plugin::Authorize authentication via the Dancer configuration file!

VERSION

version 0.04

SYNOPSIS

plugins:
  Authorize:
    mykeyword: 
      credentials:
        class: Config
        options: 
          accounts:
            user01:
              name: Joe Schmoe
              password: foobar
              roles:
                - guest
                - user
            user02:
              name: Jacque Fock
              password: barbaz
              roles:
                - admin
                
# in Dancer application

if (mykeyword()) {
    # authenticated
    return 1;
}

DESCRIPTION

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

** Note! This authentication class sets the user's roles automatically. **

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.

METHODS

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.