Changeset 11881
- Timestamp:
- 10/01/08 00:06:47 (5 years ago)
- Files:
-
- plugins/bhLDAPAuthPlugin/trunk/README (modified) (7 diffs)
- plugins/bhLDAPAuthPlugin/trunk/lib/bhLDAPAuthRouting.class.php (modified) (1 diff)
- plugins/bhLDAPAuthPlugin/trunk/lib/form (added)
- plugins/bhLDAPAuthPlugin/trunk/lib/form/bhLDAPAuthFormSignin.class.php (moved) (moved from plugins/bhLDAPAuthPlugin/trunk/lib/bhLDAPAuthFormSignin.class.php)
- plugins/bhLDAPAuthPlugin/trunk/modules/bhLDAPAuth/actions/actions.class.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/bhLDAPAuthPlugin/trunk/README
r11754 r11881 27 27 28 28 * [`sfGuardPlugin`](http://www.symfony-project.com/plugins/sfGuardPlugin). Why reinvent the wheel? 29 * For now, symfony 1.0.30 29 * Your PHP must have OpenLDAP support enabled 31 30 * Microsoft Active Directory® 32 * `sfSslRequirementPlugin`is a good idea but not strictly required (see "enable SSL" below).31 * [`sfSslRequirementPlugin`](http://www.symfony-project.org/plugins/sfSslRequirementPlugin) is a good idea but not strictly required (see "enable SSL" below). 33 32 34 33 ## Installation ## … … 38 37 * Install the `sfGuardPlugin` 39 38 40 > symfony plugin-install http://plugins.symfony-project.com/sfGuardPlugin 41 39 $ symfony plugin:install sfGuardPlugin 42 40 43 41 * Install the `bhLDAPAuthPlugin` 44 42 45 > symfony plugin-install http://plugins.symfony-project.com/bhLDAPAuthPlugin43 $ symfony plugin:install bhLDAPAuthPlugin 46 44 47 45 … … 64 62 This adds the Propel object models for tables that `sfGuardPlugin` needs to your database, even though we won't be using most of them. 65 63 66 > symfony propel-build-model67 > symfony propel-build-sql64 $ symfony propel:build-model 65 $ symfony propel:build-sql 68 66 69 67 * Update you database tables by starting from scratch (it will delete all 70 68 the existing tables, then re-create them): 71 69 72 > symfony propel-insert-sql70 $ symfony propel:insert-sql 73 71 74 72 *or*, you can just create the new tables by using the generated SQL … … 77 75 With MySQL, that would be like this: 78 76 79 >mysql -uroot -ppassword database < data/sql/plugins.sfGuardPlugin.lib.model.schema.sql77 $ mysql -uroot -ppassword database < data/sql/plugins.sfGuardPlugin.lib.model.schema.sql 80 78 81 79 * (Don't load the default sfGuardPlugin fixtures) … … 123 121 is_secure: on 124 122 125 * Tell `sfGuard` to use the password checker in `bhLDAPAuth`123 * Tell `sfGuard` to use the password checker from `bhLDAPAuth` in `apps/frontend/config/app.yml` 126 124 127 125 all: … … 132 130 valid AD credentials. 133 131 134 ### #enable SSL protection of login form132 ### enable SSL protection of login form 135 133 136 134 You don't want your AD credentials flying around the network in clear text, right? … … 231 229 ## TODO ## 232 230 233 * write tests 231 * write tests? 234 232 * make it work with symfony 1.1 235 233 * make it work with non-AD LDAP servers? I don't have any to play with. 234 * cache password hash in sfGuard tables and use it if AD isn't available (suggested by Dominik R) 236 235 237 236 ## Changelog ## plugins/bhLDAPAuthPlugin/trunk/lib/bhLDAPAuthRouting.class.php
r11867 r11881 23 23 { 24 24 $r = $event->getSubject(); 25 26 $r->prependRoute('bh_ldap_signin', '/login', array('module' => 'bhLDAPAuth', 'action' => 'signin')); 27 $r->prependRoute('sf_guard_signin', '/login', array('module' => 'bhLDAPAuth', 'action' => 'signin')); 28 25 29 parent::listenToRoutingLoadConfigurationEvent($event); 26 30 27 $r->prependRoute('bh_ldap_signin', '/login', array('module' => 'bhLDAPAuth', 'action' => 'signin')); 31 32 33 34 # $r->prependRoute('sf_guard_signin', '/signin', array('module' => 'bhLDAPAuth', 'action' => 'signin')); 28 35 29 36 /* // prepend our routes */ 30 37 31 /* $r->prependRoute('sf_guard_signin', '/login', array('module' => 'bhLDAPAuthAuth', 'action' => 'signin')); */ 32 /* $r->prependRoute('sf_guard_signout', '/logout', array('module' => 'bhLDAPAuthAuth', 'action' => 'signout')); */ 33 /* $r->prependRoute('sf_guard_password', '/request_password', array('module' => 'bhLDAPAuthAuth', 'action' => 'password')); */ 38 /* $r->prependRoute('sf_guard_signin', '/login', array('module' => 'bhLDAPAuth', 'action' => 'signin')); */ 39 40 /* $r->prependRoute('sf_guard_signout', '/logout', array('module' => 'sfGuardAuth', 'action' => 'signout')); */ 41 42 43 /* $r->prependRoute('sf_guard_password', '/request_password', array('module' => 'sfGuardAuth', 'action' => 'password')); */ 34 44 35 45 } plugins/bhLDAPAuthPlugin/trunk/modules/bhLDAPAuth/actions/actions.class.php
r11867 r11881 3 3 4 4 require_once(sfConfig::get('sf_plugins_dir').'/sfGuardPlugin/modules/sfGuardAuth/lib/BasesfGuardAuthActions.class.php'); 5 6 5 7 6 8 /** … … 21 23 if ($user->isAuthenticated()) 22 24 { 25 bhLDAP::debug("######## logged in! redirectifying to homepage"); 23 26 return $this->redirect('@homepage'); 24 27 } … … 53 56 54 57 } 55 /* elseif ($user->isAuthenticated()) */56 /* { */57 /* bhLDAP::debug("######## logged in! redirectifying to homepage"); */58 59 /* $this->redirect('@homepage'); */60 /* } */61 58 else 62 59 {