Catalyst-Authentication-Credential-OpenID
view release on metacpan or search on metacpan
NAME
Catalyst::Authentication::Credential::OpenID - OpenID credential for
Catalyst::Plugin::Authentication framework.
BACKWARDS COMPATIBILITY CHANGES
EXTENSION_ARGS v EXTENSIONS
NB: The extensions were previously configured under the key
"extension_args". They are now configured under "extensions".
"extension_args" is no longer honored.
As previously noted, "EXTENSIONS TO OPENID", I have not tested the
extensions. I would be grateful for any feedback or, better, tests.
FATALS
The problems encountered by failed OpenID operations have always been
fatals in the past. This is unexpected behavior for most users as it
differs from other credentials. Authentication errors here are no longer
fatal. Debug/error output is improved to offset the loss of information.
If for some reason you would prefer the legacy/fatal behavior, set the
configuration variable "errors_are_fatal" to a true value.
SYNOPSIS
In MyApp.pm-
use Catalyst qw/
Authentication
Session
Session::Store::FastMmap
Session::State::Cookie
/;
Somewhere in myapp.conf-
<Plugin::Authentication>
default_realm openid
<realms>
<openid>
<credential>
class OpenID
ua_class LWP::UserAgent
</credential>
</openid>
</realms>
</Plugin::Authentication>
Or in your myapp.yml if you're using YAML instead-
Plugin::Authentication:
default_realm: openid
realms:
openid:
credential:
class: OpenID
ua_class: LWP::UserAgent
In a controller, perhaps "Root::openid"-
sub openid : Local {
my($self, $c) = @_;
if ( $c->authenticate() )
{
$c->flash(message => "You signed in with OpenID!");
$c->res->redirect( $c->uri_for('/') );
}
else
{
# Present OpenID form.
}
}
And a Template to match in "openid.tt"-
<form action="[% c.uri_for('/openid') %]" method="GET" name="openid">
<input type="text" name="openid_identifier" class="openid" />
<input type="submit" value="Sign in with OpenID" />
</form>
DESCRIPTION
This is the third OpenID related authentication piece for Catalyst. The
first â Catalyst::Plugin::Authentication::OpenID by Benjamin Trott â was
deprecated by the second â
Catalyst::Plugin::Authentication::Credential::OpenID by Tatsuhiko
Miyagawa â and this is an attempt to deprecate both by conforming to the
newish, at the time of this module's inception, realm-based
authentication in Catalyst::Plugin::Authentication.
1. Catalyst::Plugin::Authentication::OpenID
2. Catalyst::Plugin::Authentication::Credential::OpenID
( run in 0.537 second using v1.01-cache-2.11-cpan-39bf76dae61 )