.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Catalyst::Plugin::Authentication::Credential::OpenID 3pm" .TH Catalyst::Plugin::Authentication::Credential::OpenID 3pm "2022-06-09" "perl v5.34.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Catalyst::Plugin::Authentication::Credential::OpenID \- OpenID credential for Catalyst::Auth framework .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 7 \& use Catalyst qw/ \& Authentication \& Authentication::Credential::OpenID \& Session \& Session::Store::FastMmap \& Session::State::Cookie \& /; \& \& # MyApp.yaml \-\- optional \& authentication: \& openid: \& use_session: 1 \& user_class: MyApp::M::User::OpenID \& \& # whatever in your Controller pm \& sub default : Private { \& my($self, $c) = @_; \& if ($c\->user_exists) { ... } \& } \& \& sub signin_openid : Local { \& my($self, $c) = @_; \& \& if ($c\->authenticate_openid) { \& $c\->res\->redirect( $c\->uri_for(\*(Aq/\*(Aq) ); \& } \& } \& \& # foo.tt \&
\& \& \&
.Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Catalyst::Plugin::Authentication::Credential::OpenID is an OpenID credential for Catalyst::Plugin::Authentication framework. .SH "METHODS" .IX Header "METHODS" .IP "authenticate_openid" 4 .IX Item "authenticate_openid" .Vb 1 \& $c\->authenticate_openid; .Ve .Sp Call this method in the action you'd like to authenticate the user via OpenID. Returns 0 if auth is not successful, and 1 if user is authenticated. .Sp User class specified with \fIuser_class\fR config, which defaults to Catalyst::Plugin::Authentication::User::Hash, will be instantiated with the following parameters. .Sp By default, authenticate_openid method looks for claimed \s-1URI\s0 parameter from the form field named \f(CW\*(C`openid_url\*(C'\fR, \&\f(CW\*(C`openid_identifier\*(C'\fR or \f(CW\*(C`claimed_uri\*(C'\fR. If you want to use another form field name, call it like: .Sp .Vb 1 \& $c\->authenticate_openid( $c\->req\->param(\*(Aqmyopenid_param\*(Aq) ); .Ve .RS 4 .IP "url" 8 .IX Item "url" .PD 0 .IP "display" 8 .IX Item "display" .IP "rss" 8 .IX Item "rss" .IP "atom" 8 .IX Item "atom" .IP "foaf" 8 .IX Item "foaf" .IP "declared_rss" 8 .IX Item "declared_rss" .IP "declared_atom" 8 .IX Item "declared_atom" .IP "declared_foaf" 8 .IX Item "declared_foaf" .IP "foafmaker" 8 .IX Item "foafmaker" .RE .RS 4 .PD .Sp See Net::OpenID::VerifiedIdentity for details. .RE .SH "DIFFERENCE WITH Authentication::OpenID" .IX Header "DIFFERENCE WITH Authentication::OpenID" There's already Catalyst::Plugin::Authentication::OpenID (Auth::OpenID) and this plugin tries to deprecate it. .IP "\(bu" 4 Don't use this plugin with Auth::OpenID since method names will conflict and your app won't work. .IP "\(bu" 4 Auth::OpenID uses your root path (/) as an authentication callback but this plugin uses the current path, which means you can use this plugin with other Credential plugins, like Flickr or TypeKey. .IP "\(bu" 4 This plugin is \s-1NOT\s0 a drop-in replacement for Auth::OpenID, but your app needs only slight modifications to work with this one. .IP "\(bu" 4 This plugin is based on Catalyst authentication framework, which means you can specify \fIuser_class\fR or \fIauth_store\fR in your app config and this modules does the right thing, like other Credential modules. This crates new User object if authentication is successful, and works with Session too. .SH "AUTHOR" .IX Header "AUTHOR" Six Apart, Ltd. .SH "LICENSE" .IX Header "LICENSE" This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. .SH "SEE ALSO" .IX Header "SEE ALSO" Catalyst::Plugin::Authentication::OpenID, Catalyst::Plugin::Authentication::Credential::Flickr