Skip to content

Commit

Permalink
Bump version + update Changes and README for release
Browse files Browse the repository at this point in the history
  • Loading branch information
SysPete committed Oct 27, 2016
1 parent 1266cda commit 37f3fa9
Show file tree
Hide file tree
Showing 10 changed files with 62 additions and 9 deletions.
22 changes: 22 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
Revision history for Dancer2-Plugin-Auth-Extensible

0.614 Thu Oct 27 16:03:17 2016 CEST

[ENHANCEMENTS]

* Add priority attribute to force order in which realms are checked
(Peter Mottram).
* Upgrade default encryption algo to SHA-512 (Peter Mottram GH#57).
* Implement disable_roles in plugin (Peter Mottram GH#38).

[DOCUMENTATION]

* Add missing optional methods to Role::Provider (Peter Mottram).

[TESTS]

* Convert tests to Plack::Test's OO style (Peter Mottram).

[MISC]

* Split out LDAP provider into its own distro (Peter Mottram).
* Avoid a memory cycle (Peter Mottram).

0.613 Tue Oct 18 15:35:19 2016 CEST

[DOCUMENTATION]
Expand Down
33 changes: 32 additions & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ AUTHENTICATION PROVIDERS
Dancer2::Plugin::Auth::Extensible::Provider::Database
Authenticates users stored in a database table

Dancer2::Plugin::Auth::Extensible::Provider::IMAP
Authenticates users via in an IMAP server.

Dancer2::Plugin::Auth::Extensible::Provider::LDAP
Authenticates users stored in an LDAP directory.

Need to write your own? Just create a new provider class which consumes
Dancer2::Plugin::Auth::Extensible::Role::Provider and implements the
required methods, and you're good to go!
Expand All @@ -98,6 +104,9 @@ CONTROLLING ACCESS TO ROUTES
login page URL. If they are logged in, but do not have the required
role, they will be redirected to the access denied URL.

If "disable_roles" configuration option is set to a true value then
using "require_role" will cause the application to croak on load.

require_any_roles - require the user to have one of a list of roles
get '/drink' => require_any_role [qw(BeerDrinker VodaDrinker)] => sub {
...
Expand All @@ -109,6 +118,10 @@ CONTROLLING ACCESS TO ROUTES
not have any of the specified roles, they will be redirected to the
access denied URL.

If "disable_roles" configuration option is set to a true value then
using "require_any_roles" will cause the application to croak on
load.

require_all_roles - require the user to have all roles listed
get '/foo' => require_all_roles [qw(Foo Bar)] => sub { ... };

Expand All @@ -118,6 +131,10 @@ CONTROLLING ACCESS TO ROUTES
the specified roles, they will be redirected to the access denied
URL.

If "disable_roles" configuration option is set to a true value then
using "require_all_roles" will cause the application to croak on
load.

Replacing the Default " /login " and " /login/denied " Routes
By default, the plugin adds a route to present a simple login form at
that URL. If you would rather add your own, set the "no_default_pages"
Expand Down Expand Up @@ -239,6 +256,10 @@ CONTROLLING ACCESS TO ROUTES

if (user_has_role($user, $role)) { .... }

If "disable_roles" configuration option is set to a true value then
using "user_has_role" will cause the application to croak at
runtime.

user_roles
Returns a list of the roles of a user.

Expand All @@ -247,6 +268,9 @@ CONTROLLING ACCESS TO ROUTES

Returns a list or arrayref depending on context.

If "disable_roles" configuration option is set to a true value then
using "user_roles" will cause the application to croak at runtime.

authenticate_user
Usually you'll want to let the built-in login handling code deal
with authenticating users, but in case you need to do it yourself,
Expand Down Expand Up @@ -574,6 +598,9 @@ CONTROLLING ACCESS TO ROUTES
plugins:
Auth::Extensible:
# Set to 1 if you want to disable the use of roles (0 is default)
# If roles are disabled then any use of role-based route decorators
# will cause app to croak on load. Use of 'user_roles' and
# 'user_has_role' will croak at runtime.
disable_roles: 0
# After /login: If no return_url is given: land here ('/' is default)
user_home_page: '/user'
Expand Down Expand Up @@ -607,8 +634,12 @@ CONTROLLING ACCESS TO ROUTES
# you wish to use)
realms:
realm_one:
priority: 3 # Defaults to 0. Realms are checked in descending order
provider: Database
db_connection_name: 'foo'
realm_two:
priority: 0 # Will be checked after realm_one
provider: Config

Please note that you must have a session provider configured. The
authentication framework requires sessions in order to track information
Expand Down Expand Up @@ -641,7 +672,7 @@ AUTHOR

Stefan Hornburg (Racke), "<racke at linuxia.de>"

Conversion to Dancer2's new plugin system in 2016 by:
Conversion to Dancer2's new plugin system plus much cleanup & reorg:

Peter Mottram (SysPete), "<peter at sysnix.com>"

Expand Down
2 changes: 1 addition & 1 deletion lib/Dancer2/Plugin/Auth/Extensible.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package Dancer2::Plugin::Auth::Extensible;

our $VERSION = '0.613';
our $VERSION = '0.614';

use strict;
use warnings;
Expand Down
2 changes: 1 addition & 1 deletion lib/Dancer2/Plugin/Auth/Extensible/Provider/Base.pm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use strict;
use warnings;
use Carp;

our $VERSION = '0.613';
our $VERSION = '0.614';

croak "Your Dancer2::Plugin::Auth::Extensible provider needs to be upgraded.\nPlease upgrade to a provider that requires Dancer2::Plugin::Auth::Extensible v0.6 or greater.\n";

Expand Down
2 changes: 1 addition & 1 deletion lib/Dancer2/Plugin/Auth/Extensible/Provider/Config.pm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use Moo;
with "Dancer2::Plugin::Auth::Extensible::Role::Provider";
use namespace::clean;

our $VERSION = '0.613';
our $VERSION = '0.614';

=head1 NAME
Expand Down
2 changes: 1 addition & 1 deletion lib/Dancer2/Plugin/Auth/Extensible/Provider/Example.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use Moo;
with "Dancer2::Plugin::Auth::Extensible::Role::Provider";
use namespace::clean;

our $VERSION = '0.613';
our $VERSION = '0.614';

# A more sensible provider would be likely to get this information from e.g. a
# database (or LDAP, or...) rather than hardcoding it. This, however, is an
Expand Down
2 changes: 1 addition & 1 deletion lib/Dancer2/Plugin/Auth/Extensible/Provider/Unix.pm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use Moo;
with "Dancer2::Plugin::Auth::Extensible::Role::Provider";
use namespace::clean;

our $VERSION = '0.613';
our $VERSION = '0.614';

=head1 NAME
Expand Down
2 changes: 1 addition & 1 deletion lib/Dancer2/Plugin/Auth/Extensible/Role/Provider.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use Crypt::SaltedHash;
use Moo::Role;
requires qw(authenticate_user get_user_details get_user_roles);

our $VERSION = '0.613';
our $VERSION = '0.614';

=head1 NAME
Expand Down
2 changes: 1 addition & 1 deletion lib/Dancer2/Plugin/Auth/Extensible/Test.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package Dancer2::Plugin::Auth::Extensible::Test;

our $VERSION = '0.613';
our $VERSION = '0.614';

=head1 NAME
Expand Down
2 changes: 1 addition & 1 deletion lib/Dancer2/Plugin/Auth/Extensible/Test/App.pm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Dancer2::Plugin::Auth::Extensible::Test::App - Dancer2 app for testing providers
=cut

our $VERSION = '0.613';
our $VERSION = '0.614';

use strict;
use Dancer2 appname => 'TestApp';
Expand Down

0 comments on commit 37f3fa9

Please sign in to comment.