-
Notifications
You must be signed in to change notification settings - Fork 11
Getting Started [Installation & Configuration]
This package follows standard installation rules, which can be found within the [FuelPHP Documentation for Packages] (http://fuelphp.com/docs/general/packages.html).
You have two options you can autoload the package in your app/config.php
:
'always_load' => array(
'packages' => array(
array('warden')
),
) //...
or load it manually like so
Fuel::add_package('warden');
There are two ways to install Warden:
View config/install.sql
for table structures or simply import into your database.
php oil r warden
This will install warden and the tables required depending on the values in your warden configuration file.
If no configuration file exists, then warden will create a file named warden.php
in your APPPATH
config directory.
Don't forget to create your roles and permissions in the roles
and permissions
tables to be able to assign roles and permissions to users.
Create or copy warden's config file into your APPPATH
config directory if it does not exist.
The following configuration options are available:
-
(int) lifetime
: The remember-me cookie lifetime, in seconds. (default:1209600
) -
(string) default_role
: The default role to assign a newly created user, it must already exist. (default:null
) -
(bool) profilable
: Set to add support for user profiles. (default:false
) -
(bool) trackable
: Set to track information about user sign ins. (default:false
) -
recoverable
: Takes care of resetting the user password.-
(bool) in_use
: Set to true, to enable (default:false
) -
(string) reset_password_within
: The limit time within which the reset password token is valid. (default:+1 week
)
-
-
confirmable
: verify if an account is already confirmed to sign in.-
(bool) in_use
: Set to true, to enable (default:false
) -
(string) confirm_within
: The limit time within which the confirmation token is valid. (default:+1 week
)
-
-
lockable
: handles blocking a user access after a certain number of attempts.-
(bool) in_use
: Set to true, to enable (default:false
) -
(integer) maximum_attempts
: How many attempts should be accepted before blocking the user. (default:10
) -
(string) lock_strategy
: This can be any integer column name in the users table. (default:sign_in_count
) -
(string) unlock_strategy
: Unlock the user account by time, email, both or none. (default:both
) -
(string) unlock_in
: The time you want to lock the user after to lock happens. (default:+1 week
)
-
-
http_authenticatable
: provides basic and digest authentication.-
(bool) in_use
: Set to true, to enable (default:false
) -
(string) method
: The type of Http method to use for authentication. (default:digest
) -
(string) realm
: (default:Protected by Warden
) -
(array) users
: The users to permit. (default:array()
) -
(string) failure_text
: The message to display on failure. (default:<h1>401 Unauthorized</h1>
)
-
-
omniauthable
: provides OAuth support.-
(bool) in_use
: Set to true, to enable (default:false
) -
(array) urls
: The urls to use for omniauth authentication. -
(array) providers
: The providers that are available. -
(bool) link_multiple
: Whether multiple providers can be attached to one user account. (default:true
)
-