[Catalyst-commits] r8395 - in
Catalyst-Authentication-Credential-HTTP/1.000/trunk: .
lib/Catalyst/Authentication/Credential
t0m at dev.catalyst.perl.org
t0m at dev.catalyst.perl.org
Wed Sep 10 16:46:36 BST 2008
Author: t0m
Date: 2008-09-10 16:46:35 +0100 (Wed, 10 Sep 2008)
New Revision: 8395
Modified:
Catalyst-Authentication-Credential-HTTP/1.000/trunk/Changes
Catalyst-Authentication-Credential-HTTP/1.000/trunk/Todo
Catalyst-Authentication-Credential-HTTP/1.000/trunk/lib/Catalyst/Authentication/Credential/HTTP.pm
Log:
Add an example of how to call authorization_required_response (you used to just be able to call it on , but now we are no longer a plugin, it's a tad more involved)
Modified: Catalyst-Authentication-Credential-HTTP/1.000/trunk/Changes
===================================================================
--- Catalyst-Authentication-Credential-HTTP/1.000/trunk/Changes 2008-09-10 15:15:29 UTC (rev 8394)
+++ Catalyst-Authentication-Credential-HTTP/1.000/trunk/Changes 2008-09-10 15:46:35 UTC (rev 8395)
@@ -3,6 +3,8 @@
when calling $c->authenticate. Docs and tests for this.
- Clean up documentation of options inherited from
Catalyst::Authentication::Credential::Password
+ - Added an example of calling methods in the credential module from a
+ controller to the POD.
1.002 2008-09-03
- Fix the assumptions that the password field is named password when doing
Modified: Catalyst-Authentication-Credential-HTTP/1.000/trunk/Todo
===================================================================
--- Catalyst-Authentication-Credential-HTTP/1.000/trunk/Todo 2008-09-10 15:15:29 UTC (rev 8394)
+++ Catalyst-Authentication-Credential-HTTP/1.000/trunk/Todo 2008-09-10 15:46:35 UTC (rev 8395)
@@ -1,6 +1,4 @@
. Document md5'd passwords for digest stuff
-. Port work's apps.
-. Document how to find the credential module, so that you can call authorization_required_response if you want to.
. Add deprecation notice to old module.
. document & test authorization_required_message
. Test $self->_config->{authorization_required_message} + authorization_required_message = undef does not stamp on body.
Modified: Catalyst-Authentication-Credential-HTTP/1.000/trunk/lib/Catalyst/Authentication/Credential/HTTP.pm
===================================================================
--- Catalyst-Authentication-Credential-HTTP/1.000/trunk/lib/Catalyst/Authentication/Credential/HTTP.pm 2008-09-10 15:15:29 UTC (rev 8394)
+++ Catalyst-Authentication-Credential-HTTP/1.000/trunk/lib/Catalyst/Authentication/Credential/HTTP.pm 2008-09-10 15:46:35 UTC (rev 8395)
@@ -410,6 +410,16 @@
do_stuff();
}
+
+ sub always_auth : Local {
+ my ( $self, $c ) = @_;
+
+ # Force authorization headers onto the response so that the user
+ # is asked again for authentication, even if they successfully
+ # authenticated.
+ my $realm = $c->get_auth_realm('example');
+ $realm->credential->authorization_required_response($c, $realm);
+ }
# with ACL plugin
__PACKAGE__->deny_access_unless("/path", sub { $_[0]->authenticate });
More information about the Catalyst-commits
mailing list