Development

Changeset 11881

You must first sign up to be able to contribute.

Changeset 11881

Show
Ignore:
Timestamp:
10/01/08 00:06:47 (5 years ago)
Author:
Nathan.Vonnahme
Message:

routing fix

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/bhLDAPAuthPlugin/trunk/README

    r11754 r11881  
    2727 
    2828  * [`sfGuardPlugin`](http://www.symfony-project.com/plugins/sfGuardPlugin).  Why reinvent the wheel? 
    29   * For now, symfony 1.0. 
    3029  * Your PHP must have OpenLDAP support enabled 
    3130  * 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). 
    3332 
    3433## Installation ## 
     
    3837* Install the `sfGuardPlugin` 
    3938 
    40     > symfony plugin-install http://plugins.symfony-project.com/sfGuardPlugin 
    41  
     39    $ symfony plugin:install sfGuardPlugin 
    4240 
    4341* Install the `bhLDAPAuthPlugin` 
    4442 
    45     > symfony plugin-install http://plugins.symfony-project.com/bhLDAPAuthPlugin 
     43    $ symfony plugin:install bhLDAPAuthPlugin 
    4644 
    4745 
     
    6462This adds the Propel object models for tables that `sfGuardPlugin` needs to your database, even though we won't be using most of them. 
    6563 
    66     > symfony propel-build-model 
    67     > symfony propel-build-sql 
     64    $ symfony propel:build-model 
     65    $ symfony propel:build-sql 
    6866 
    6967* Update you database tables by starting from scratch (it will delete all 
    7068the existing tables, then re-create them): 
    7169   
    72     > symfony propel-insert-sql 
     70    $ symfony propel:insert-sql 
    7371 
    7472*or*, you can just create the new tables by using the generated SQL 
     
    7775With MySQL, that would be like this: 
    7876 
    79     > mysql -uroot -ppassword database < data/sql/plugins.sfGuardPlugin.lib.model.schema.sql 
     77    $ mysql -uroot -ppassword database < data/sql/plugins.sfGuardPlugin.lib.model.schema.sql 
    8078 
    8179* (Don't load the default sfGuardPlugin fixtures) 
     
    123121      is_secure: on 
    124122 
    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
    126124   
    127125    all: 
     
    132130valid AD credentials. 
    133131 
    134 #### enable SSL protection of login form 
     132### enable SSL protection of login form 
    135133 
    136134You don't want your AD credentials flying around the network in clear text, right?   
     
    231229## TODO ## 
    232230 
    233 * write tests 
     231* write tests? 
    234232* make it work with symfony 1.1 
    235233* 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) 
    236235 
    237236## Changelog ## 
  • plugins/bhLDAPAuthPlugin/trunk/lib/bhLDAPAuthRouting.class.php

    r11867 r11881  
    2323  { 
    2424    $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 
    2529    parent::listenToRoutingLoadConfigurationEvent($event); 
    2630 
    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')); 
    2835 
    2936/*     // prepend our routes */ 
    3037 
    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')); */ 
    3444 
    3545  } 
  • plugins/bhLDAPAuthPlugin/trunk/modules/bhLDAPAuth/actions/actions.class.php

    r11867 r11881  
    33 
    44require_once(sfConfig::get('sf_plugins_dir').'/sfGuardPlugin/modules/sfGuardAuth/lib/BasesfGuardAuthActions.class.php'); 
     5 
     6 
    57 
    68/** 
     
    2123    if ($user->isAuthenticated()) 
    2224    { 
     25      bhLDAP::debug("########  logged in!  redirectifying to homepage"); 
    2326      return $this->redirect('@homepage'); 
    2427    } 
     
    5356     
    5457    } 
    55 /*     elseif ($user->isAuthenticated()) */ 
    56 /*     { */ 
    57 /*       bhLDAP::debug("########  logged in!  redirectifying to homepage"); */ 
    58  
    59 /*       $this->redirect('@homepage'); */ 
    60 /*     } */ 
    6158    else 
    6259    {