[Jifty-commit] jifty-plugin-openid branch, master, updated. b7e742aed3032f66a30d9a3884d8a864352e162b

Jifty commits jifty-commit at lists.jifty.org
Wed Jun 23 17:46:18 EDT 2010


The branch, master has been updated
       via  b7e742aed3032f66a30d9a3884d8a864352e162b (commit)
       via  87cc8ff466246b59c3c3357741ea72443f1a5fd2 (commit)
       via  052ecee38a0476dcaacefd7fba9b869653baa254 (commit)
      from  ea56e427ebeef4416390587595ea0af5bad99e6a (commit)

Summary of changes:
 .gitignore                 |   13 ++++++++++
 lib/Jifty/Plugin/OpenID.pm |   56 +++++++++++++++++++++++++++----------------
 2 files changed, 48 insertions(+), 21 deletions(-)
 create mode 100644 .gitignore

- Log -----------------------------------------------------------------
commit 052ecee38a0476dcaacefd7fba9b869653baa254
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Thu Jun 24 01:44:27 2010 +0400

    minor spaces changes

diff --git a/lib/Jifty/Plugin/OpenID.pm b/lib/Jifty/Plugin/OpenID.pm
index dc4834d..eb5e8e1 100644
--- a/lib/Jifty/Plugin/OpenID.pm
+++ b/lib/Jifty/Plugin/OpenID.pm
@@ -67,8 +67,10 @@ OpenID plugin provides AuthenticateOpenID Action. so that you can render an
 AuthenticateOpenID in your template:
 
     form {
-        my $openid = new_action( class   => 'AuthenticateOpenID',
-                                moniker => 'authenticateopenid' );
+        my $openid = new_action(
+            class   => 'AuthenticateOpenID',
+            moniker => 'authenticateopenid',
+        );
         render_action( $openid );
     };
 
@@ -76,8 +78,10 @@ this action renders a form which provides openid url field.
 and you will need to provide a submit button in your form.  
 
     form {
-        my $openid = new_action( class   => 'AuthenticateOpenID',
-                                moniker => 'authenticateopenid' );
+        my $openid = new_action(
+            class   => 'AuthenticateOpenID',
+            moniker => 'authenticateopenid',
+        );
 
         # ....
 
@@ -87,7 +91,8 @@ and you will need to provide a submit button in your form.
                 to     => '/openid_verify_done',
                 label  => _("Login with OpenID"),
                 submit => $openid
-            ));
+            );
+        );
     };
 
 the C<to> field is for verified user to redirect to.

commit 87cc8ff466246b59c3c3357741ea72443f1a5fd2
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Thu Jun 24 01:45:52 2010 +0400

    make documentation more clear and with more examples

diff --git a/lib/Jifty/Plugin/OpenID.pm b/lib/Jifty/Plugin/OpenID.pm
index eb5e8e1..f698b41 100644
--- a/lib/Jifty/Plugin/OpenID.pm
+++ b/lib/Jifty/Plugin/OpenID.pm
@@ -20,6 +20,13 @@ Provides OpenID authentication for your app
 
 First add the C<OpenID> plugin to the list of plugins in F<etc/config.yml>.
 
+    --- 
+    framework:
+        ...
+        Plugins:
+            ...
+            - OpenID: {}
+
 Please provide C<OpenIDSecret> in your F<etc/config.yml> , the C<OpenIDUA> is
 B<optional> , OpenID Plugin will use L<LWPx::ParanoidAgent> by default.
 
@@ -32,38 +39,40 @@ or you can set C<OpenIDUserAgent> environment var in command-line:
 
     OpenIDUserAgent=LWP::UserAgent bin/jifty server
 
-if you are using L<LWPx::ParanoidAgent> as your openid agent. 
-you will need to provide C<JIFTY_OPENID_WHITELIST_HOST> for your own OpenID server.
+If you are using L<LWPx::ParanoidAgent> as your openid agent,
+you will need to provide C<JIFTY_OPENID_WHITELIST_HOST> for your
+own OpenID server.
 
     export JIFTY_OPENID_WHITELIST_HOST=123.123.123.123
 
 =head2 User Model
 
-Create your user model , and let it uses
-L<Jifty::Plugin::OpenID::Mixin::Model::User> to mixin "openid" column.
-and a C<name> method.
+Create your user model:
 
-    use TestApp::Record schema {
+    jifty model --name User
 
-        column email =>
-            type is 'varchar';
+Mixin openid column using 
+L<Jifty::Plugin::OpenID::Mixin::Model::User>:
 
+    package TestApp::Model::User;
+    ...
+    use TestApp::Record schema {
+        ...
     };
     use Jifty::Plugin::OpenID::Mixin::Model::User;
 
-    sub name {
+Note: you might need to declare a C<brief_description> method that is
+used to show welcome message and success message containing user's "name".
+See L<Jifty::Record/brief_description> method. For example:
+
+    sub brief_description {
         my $self = shift;
-        return $self->email;
+        return $self->openid;
     }
 
-Note: you might need to declare a C<name> method. because the OpenID
-CreateOpenIDUser action and SkeletonApp needs current_user->username to show
-welcome message and success message , which calls C<brief_description> method.
-See L<Jifty::Record> for C<brief_description> method.
-
 =head2 View
 
-OpenID plugin provides AuthenticateOpenID Action. so that you can render an
+OpenID plugin provides C<AuthenticateOpenID> action. so that you can render an
 AuthenticateOpenID in your template:
 
     form {

commit b7e742aed3032f66a30d9a3884d8a864352e162b
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Thu Jun 24 01:47:13 2010 +0400

    .gitignore

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..0a12b71
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,13 @@
+Makefile
+Makefile.bak
+Makefile.old
+Makefile.new
+pm_to_blib
+blib/
+MANIFEST.bak
+MANIFEST.new
+MANIFEST.old
+cover_db/
+nytprof/
+*.tar.gz
+*.sw[po]

-----------------------------------------------------------------------


More information about the Jifty-commit mailing list