Copyright (c) 2008 Tero Alén
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sub-license, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
taOpenIDsfGuard plugin
The taOpenIDsfGuardPlugin is a symfony plugin that adds openID support on sfGuardPlugin. It uses Zend Frameworks OpenID library.
It gives you the model and the module which allow users to manage their OpenIDs. It support both versions OpenID 1.0 and 2.0.
Installation
- If not installed, install first sfGuardPlugin
Download and install Zend Framework (I installed mine on lib/zf)
Add location of Zend Framework and autoloader to settings.yml
zend_lib_dir: %SF_LIB_DIR%/zf/library/
autoloading_functions:
Because Zend Framework wants start session to work properly Update factories.yml session_autostart value to false
all:
storage:
class: sfSessionStorage
param:
auto_start: false
Add following row to apps config.php
Zend_Session::start();
Build you model
symfony propel-build-all
Enable taOpenID module for your application
all:
.settings:
enabled_modules: [taOpenID](default,)
Add routes to routing.yml
openid_signin:
url: /taOpenID/Signin/*
param: {module: taOpenID, action: SignIn}
openid_finishauth:
url: /taOpenID/Finish
param: {module: taOpenID, action: Finish}
openid_default:
url: /taOpenID
param: {module: sfGuardAuth, action: signin}
Clear you cache
symfony cc
Include OpenID signing form to your login page
<?php include_partial('taOpenID/signinForm') ?>
Manage your openIDs
To manage your openIDs:
Enable the module taOpenID in settings.yml
all:
.settings:
enabled_modules: [taOpenID](...,)
Go to taOpenID's manage action
http://www.example.com/taOpenID/manage
TODO
- Support for registration with openID
Changelog
1.0.0
* Tero.Alen: Initial release