Skip to content

Commit 37f3fa9

Browse files
committed
Bump version + update Changes and README for release
1 parent 1266cda commit 37f3fa9

File tree

10 files changed

+62
-9
lines changed

10 files changed

+62
-9
lines changed

Changes

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
Revision history for Dancer2-Plugin-Auth-Extensible
22

3+
0.614 Thu Oct 27 16:03:17 2016 CEST
4+
5+
[ENHANCEMENTS]
6+
7+
* Add priority attribute to force order in which realms are checked
8+
(Peter Mottram).
9+
* Upgrade default encryption algo to SHA-512 (Peter Mottram GH#57).
10+
* Implement disable_roles in plugin (Peter Mottram GH#38).
11+
12+
[DOCUMENTATION]
13+
14+
* Add missing optional methods to Role::Provider (Peter Mottram).
15+
16+
[TESTS]
17+
18+
* Convert tests to Plack::Test's OO style (Peter Mottram).
19+
20+
[MISC]
21+
22+
* Split out LDAP provider into its own distro (Peter Mottram).
23+
* Avoid a memory cycle (Peter Mottram).
24+
325
0.613 Tue Oct 18 15:35:19 2016 CEST
426

527
[DOCUMENTATION]

README

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@ AUTHENTICATION PROVIDERS
7575
Dancer2::Plugin::Auth::Extensible::Provider::Database
7676
Authenticates users stored in a database table
7777

78+
Dancer2::Plugin::Auth::Extensible::Provider::IMAP
79+
Authenticates users via in an IMAP server.
80+
81+
Dancer2::Plugin::Auth::Extensible::Provider::LDAP
82+
Authenticates users stored in an LDAP directory.
83+
7884
Need to write your own? Just create a new provider class which consumes
7985
Dancer2::Plugin::Auth::Extensible::Role::Provider and implements the
8086
required methods, and you're good to go!
@@ -98,6 +104,9 @@ CONTROLLING ACCESS TO ROUTES
98104
login page URL. If they are logged in, but do not have the required
99105
role, they will be redirected to the access denied URL.
100106

107+
If "disable_roles" configuration option is set to a true value then
108+
using "require_role" will cause the application to croak on load.
109+
101110
require_any_roles - require the user to have one of a list of roles
102111
get '/drink' => require_any_role [qw(BeerDrinker VodaDrinker)] => sub {
103112
...
@@ -109,6 +118,10 @@ CONTROLLING ACCESS TO ROUTES
109118
not have any of the specified roles, they will be redirected to the
110119
access denied URL.
111120

121+
If "disable_roles" configuration option is set to a true value then
122+
using "require_any_roles" will cause the application to croak on
123+
load.
124+
112125
require_all_roles - require the user to have all roles listed
113126
get '/foo' => require_all_roles [qw(Foo Bar)] => sub { ... };
114127

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

134+
If "disable_roles" configuration option is set to a true value then
135+
using "require_all_roles" will cause the application to croak on
136+
load.
137+
121138
Replacing the Default " /login " and " /login/denied " Routes
122139
By default, the plugin adds a route to present a simple login form at
123140
that URL. If you would rather add your own, set the "no_default_pages"
@@ -239,6 +256,10 @@ CONTROLLING ACCESS TO ROUTES
239256

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

259+
If "disable_roles" configuration option is set to a true value then
260+
using "user_has_role" will cause the application to croak at
261+
runtime.
262+
242263
user_roles
243264
Returns a list of the roles of a user.
244265

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

248269
Returns a list or arrayref depending on context.
249270

271+
If "disable_roles" configuration option is set to a true value then
272+
using "user_roles" will cause the application to croak at runtime.
273+
250274
authenticate_user
251275
Usually you'll want to let the built-in login handling code deal
252276
with authenticating users, but in case you need to do it yourself,
@@ -574,6 +598,9 @@ CONTROLLING ACCESS TO ROUTES
574598
plugins:
575599
Auth::Extensible:
576600
# Set to 1 if you want to disable the use of roles (0 is default)
601+
# If roles are disabled then any use of role-based route decorators
602+
# will cause app to croak on load. Use of 'user_roles' and
603+
# 'user_has_role' will croak at runtime.
577604
disable_roles: 0
578605
# After /login: If no return_url is given: land here ('/' is default)
579606
user_home_page: '/user'
@@ -607,8 +634,12 @@ CONTROLLING ACCESS TO ROUTES
607634
# you wish to use)
608635
realms:
609636
realm_one:
637+
priority: 3 # Defaults to 0. Realms are checked in descending order
610638
provider: Database
611639
db_connection_name: 'foo'
640+
realm_two:
641+
priority: 0 # Will be checked after realm_one
642+
provider: Config
612643

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

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

644-
Conversion to Dancer2's new plugin system in 2016 by:
675+
Conversion to Dancer2's new plugin system plus much cleanup & reorg:
645676

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

lib/Dancer2/Plugin/Auth/Extensible.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package Dancer2::Plugin::Auth::Extensible;
22

3-
our $VERSION = '0.613';
3+
our $VERSION = '0.614';
44

55
use strict;
66
use warnings;

lib/Dancer2/Plugin/Auth/Extensible/Provider/Base.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use strict;
55
use warnings;
66
use Carp;
77

8-
our $VERSION = '0.613';
8+
our $VERSION = '0.614';
99

1010
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";
1111

lib/Dancer2/Plugin/Auth/Extensible/Provider/Config.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use Moo;
66
with "Dancer2::Plugin::Auth::Extensible::Role::Provider";
77
use namespace::clean;
88

9-
our $VERSION = '0.613';
9+
our $VERSION = '0.614';
1010

1111
=head1 NAME
1212

lib/Dancer2/Plugin/Auth/Extensible/Provider/Example.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use Moo;
44
with "Dancer2::Plugin::Auth::Extensible::Role::Provider";
55
use namespace::clean;
66

7-
our $VERSION = '0.613';
7+
our $VERSION = '0.614';
88

99
# A more sensible provider would be likely to get this information from e.g. a
1010
# database (or LDAP, or...) rather than hardcoding it. This, however, is an

lib/Dancer2/Plugin/Auth/Extensible/Provider/Unix.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use Moo;
66
with "Dancer2::Plugin::Auth::Extensible::Role::Provider";
77
use namespace::clean;
88

9-
our $VERSION = '0.613';
9+
our $VERSION = '0.614';
1010

1111
=head1 NAME
1212

lib/Dancer2/Plugin/Auth/Extensible/Role/Provider.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use Crypt::SaltedHash;
44
use Moo::Role;
55
requires qw(authenticate_user get_user_details get_user_roles);
66

7-
our $VERSION = '0.613';
7+
our $VERSION = '0.614';
88

99
=head1 NAME
1010

lib/Dancer2/Plugin/Auth/Extensible/Test.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package Dancer2::Plugin::Auth::Extensible::Test;
22

3-
our $VERSION = '0.613';
3+
our $VERSION = '0.614';
44

55
=head1 NAME
66

lib/Dancer2/Plugin/Auth/Extensible/Test/App.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Dancer2::Plugin::Auth::Extensible::Test::App - Dancer2 app for testing providers
66
77
=cut
88

9-
our $VERSION = '0.613';
9+
our $VERSION = '0.614';
1010

1111
use strict;
1212
use Dancer2 appname => 'TestApp';

0 commit comments

Comments
 (0)