Changes between Version 2 and Version 3 of GuardPlugin


Ignore:
Timestamp:
2010-08-19T18:30:17Z (14 years ago)
Author:
Pan Luo
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GuardPlugin

    v2 v3  
    5353Some of the AuthComponent properties can be override through the configuration file.
    5454
    55 == Using Existing Authentication Modules ==
     55== Using Existing Modules ==
    5656Currently, the authentication modules that come with the plugin are:
    5757
     
    8585* loginError: The error message when user logged in successfully through Shibboleth but do not have an valid account or permission in the application. This is an example to override the [http://api13.cakephp.org/class/auth-component AuthComponent] properties.
    8686
    87 == Developing New Authentication Module ==
     87
     88== Customize Modules ==
     89
     90By default, the existing modules come with a simple login template under app/plugins/guard/views/guard. Each module has its own element for the login template under app/plugins/guard/views/elements, e.g. text input for Default and login button for Shibboleth.
     91
     92If you want to customize the template or elements:
     93 * Create app/views/plugins/guard/guard/login.ctp for template
     94 * Create app/views/plugins/guard/elements/login_MODULENAME.ctp for elemets
     95 * The MODULENAME is the authentication module you want to customize, e.g. Shibboleth or Default
     96 * Now CakePHP will render your template or elements instead of default ones
     97
     98
     99== Developing New Module ==
    88100All the authentication modules extend !AuthModule, which provides some default properties and methods required by the authentication module.
    89101Every authentication must implement  authenticate() method to verify the user. The authentication module should like look this:
     
    102114 * $hasLoginForm: If this module has login form
    103115
     116The new module should be placed in app/libs with the name like: MODULENAME_module.php
    104117