From f9f81db04f136f0766dac9414bc4975915c476de Mon Sep 17 00:00:00 2001 From: Kiall Mac Innes Date: Sun, 7 Aug 2011 02:44:59 +0100 Subject: [PATCH 01/10] Cleanup some phpCS issues. --- classes/kohana/auth.php | 16 +++++++++------- classes/kohana/auth/file.php | 14 +++++++------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/classes/kohana/auth.php b/classes/kohana/auth.php index c5030e8..7b97fb0 100644 --- a/classes/kohana/auth.php +++ b/classes/kohana/auth.php @@ -47,6 +47,7 @@ public static function instance() /** * Loads Session and configuration options. * + * @param array $config Config Options * @return void */ public function __construct($config = array()) @@ -67,6 +68,7 @@ abstract public function check_password($password); * Gets the currently logged in user from the session. * Returns NULL if no user is currently logged in. * + * @param mixed $default Default value to return if the user is currently not logged in. * @return mixed */ public function get_user($default = NULL) @@ -77,9 +79,9 @@ public function get_user($default = NULL) /** * Attempt to log in a user by using an ORM object and plain-text password. * - * @param string username to log in - * @param string password to check against - * @param boolean enable autologin + * @param string $username Username to log in + * @param string $password Password to check against + * @param boolean $remember Enable autologin * @return boolean */ public function login($username, $password, $remember = FALSE) @@ -99,8 +101,8 @@ public function login($username, $password, $remember = FALSE) /** * Log out a user by removing the related session variables. * - * @param boolean completely destroy the session - * @param boolean remove all tokens for user + * @param boolean $destroy Completely destroy the session + * @param boolean $logout_all Remove all tokens for user * @return boolean */ public function logout($destroy = FALSE, $logout_all = FALSE) @@ -127,7 +129,7 @@ public function logout($destroy = FALSE, $logout_all = FALSE) * Check if there is an active session. Optionally allows checking for a * specific role. * - * @param string role name + * @param string $role role name * @return mixed */ public function logged_in($role = NULL) @@ -140,7 +142,7 @@ public function logged_in($role = NULL) * method is deprecated, [Auth::hash] should be used instead. * * @deprecated - * @param string plaintext password + * @param string $password Plaintext password */ public function hash_password($password) { diff --git a/classes/kohana/auth/file.php b/classes/kohana/auth/file.php index 31ca0c3..4f8e642 100644 --- a/classes/kohana/auth/file.php +++ b/classes/kohana/auth/file.php @@ -27,9 +27,9 @@ public function __construct($config = array()) /** * Logs a user in. * - * @param string username - * @param string password - * @param boolean enable autologin (not supported) + * @param string $username Username + * @param string $password Password + * @param boolean $remember Enable autologin (not supported) * @return boolean */ protected function _login($username, $password, $remember) @@ -47,7 +47,7 @@ protected function _login($username, $password, $remember) /** * Forces a user to be logged in, without specifying a password. * - * @param mixed username + * @param mixed $username Username * @return boolean */ public function force_login($username) @@ -59,7 +59,7 @@ public function force_login($username) /** * Get the stored password for a username. * - * @param mixed username + * @param mixed $username Username * @return string */ public function password($username) @@ -70,7 +70,7 @@ public function password($username) /** * Compare password with original (plain text). Works for current (logged in) user * - * @param string $password + * @param string $password Password * @return boolean */ public function check_password($password) @@ -85,4 +85,4 @@ public function check_password($password) return ($password === $this->password($username)); } -} // End Auth File \ No newline at end of file +} // End Auth File From 5b412c831ab054b63dccb6cbb5acce67944b7dbb Mon Sep 17 00:00:00 2001 From: Kiall Mac Innes Date: Fri, 23 Sep 2011 17:20:53 +0100 Subject: [PATCH 02/10] Fixing CS Issues. Uppercase Constants and Logical Operators --- classes/auth.php | 2 +- classes/auth/file.php | 2 +- classes/kohana/auth.php | 2 +- classes/kohana/auth/file.php | 2 +- config/auth.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/classes/auth.php b/classes/auth.php index a02b1e5..8d31fad 100644 --- a/classes/auth.php +++ b/classes/auth.php @@ -1,3 +1,3 @@ - Date: Tue, 6 Dec 2011 12:13:46 -0500 Subject: [PATCH 03/10] Activating the userguide. --- config/userguide.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 config/userguide.php diff --git a/config/userguide.php b/config/userguide.php new file mode 100644 index 0000000..a56071d --- /dev/null +++ b/config/userguide.php @@ -0,0 +1,23 @@ + array( + + // This should be the path to this modules userguide pages, without the 'guide/'. Ex: '/guide/modulename/' would be 'modulename' + 'auth' => array( + + // Whether this modules userguide pages should be shown + 'enabled' => TRUE, + + // The name that should show up on the userguide index page + 'name' => 'Auth', + + // A short description of this module, shown on the index page + 'description' => 'User authentication and authorization.', + + // Copyright message, shown in the footer for this module + 'copyright' => '© 2008–2011 Kohana Team', + ) + ) +); \ No newline at end of file From c303a7302d926d53c9f379c8d4d50cfa7cfe9f07 Mon Sep 17 00:00:00 2001 From: Dave Widmer Date: Tue, 6 Dec 2011 12:19:47 -0500 Subject: [PATCH 04/10] First crack at userguide documentation. --- guide/auth/config.md | 14 +++++++ guide/auth/driver/develop.md | 79 ++++++++++++++++++++++++++++++++++++ guide/auth/driver/file.md | 23 +++++++++++ guide/auth/edit.md | 0 guide/auth/index.md | 17 ++++++++ guide/auth/login.md | 46 +++++++++++++++++++++ guide/auth/menu.md | 8 ++-- guide/auth/register.md | 0 guide/auth/roles.md | 0 guide/auth/user.md | 0 10 files changed, 182 insertions(+), 5 deletions(-) create mode 100644 guide/auth/driver/develop.md create mode 100644 guide/auth/driver/file.md delete mode 100644 guide/auth/edit.md delete mode 100644 guide/auth/register.md delete mode 100644 guide/auth/roles.md delete mode 100644 guide/auth/user.md diff --git a/guide/auth/config.md b/guide/auth/config.md index e69de29..e1cb05b 100644 --- a/guide/auth/config.md +++ b/guide/auth/config.md @@ -0,0 +1,14 @@ +# Configuration + +The default config file is located in `MODPATH/auth/config/auth.php`. You should copy this file to `APPPATH/config/auth.php` and make changes there, in keeping with the [cascading filesystem](../kohana/files). + +[Config merging](../kohana/config#config-merging) allows the default config settings to apply if you don't overwrite them in your application configuration file. + +Name | Type | Default | Description +-----|------|---------|------------ +driver | `string` | file | The name of the auth driver to use. +hash_method | `string` | sha256 | The hashing function to use. +hash_key | `string` | NULL | The key to use when hashing the password. +lifetime | `int` | 1209600 | The time (in seconds) that the user session is valid without activity. +session_type | `string` | [Session::$default] | The type of session to use to store the auth user. +session_key | `string` | auth_user | The name of the session variable to save the user. diff --git a/guide/auth/driver/develop.md b/guide/auth/driver/develop.md new file mode 100644 index 0000000..6d615eb --- /dev/null +++ b/guide/auth/driver/develop.md @@ -0,0 +1,79 @@ +# Developing Drivers + +[!!] We will be developing an `example` driver. In your own driver you will substitute `example` with your driver name. + +This example file would be saved at `APPPATH/classes/auth/example.php` (or `MODPATH` if you are creating a module). + +## Quick Example + +First we will show you a quick example and then break down what is going on. + +~~~ +class Auth_Example extends Auth +{ + protected function _login($username, $password, $remember) + { + // Do username/password check here + } + + public function password($username) + { + // Return the password for the username + } + + public function check_password($password) + { + // Check to see if the logged in user has the given password + } + + public function logged_in($role = NULL) + { + // Check to see if the user is logged in, and if $role is set, has all roles + } + + public function get_user($default = NULL) + { + // Get the logged in user, or return the $default if a user is not found + } +} +~~~ + +## Extending Auth + +All drivers must extend the [Auth] class. + + class Auth_Example extends Auth + +## Abstract Methods + +The `Auth` class has 3 abstract methods that must be defined in your new driver. + +~~~ +abstract protected function _login($username, $password, $remember); + +abstract public function password($username); + +abstract public function check_password($user); +~~~ + +## Extending Functionality + +Given that every auth system is going to check if users exist and if they have roles or not you will more than likely have to change some default functionality. + +Here are a few functions that you should pay attention to. + +~~~ +public function logged_in($role = NULL) + +public function get_user($default = NULL) +~~~ + +## Activating the Driver + +After you create your driver you will want to use it. It is a easy as setting the `driver` [configuration](config) option to the name of your driver (in our case `example`). + +## Real World Examples + +Sometimes the best way to learn is to just read the code. Here are a auth drivers that you can take a look at. + +* [ORM](https://github.com/kohana/orm/blob/3.2/master/classes/kohana/auth/orm.php) diff --git a/guide/auth/driver/file.md b/guide/auth/driver/file.md new file mode 100644 index 0000000..f2de024 --- /dev/null +++ b/guide/auth/driver/file.md @@ -0,0 +1,23 @@ +# File Driver + +The [Auth::File] driver is the default driver when you activate the auth module. + +Below are additional configuration options that can be set for this driver. + +Name | Type | Default | Description +-----|------|---------|------------- +users | `array` | array() | A user => password (hashed) array of all the users in your application + +## Forcing Login + +[Auth_File::force_login] allows you to force a user login without a password. + +~~~ +// Force the admin user to be logged in +Auth::instance()->force_login('admin'); +$user = Auth::instance()->get_user(); // Returns the user with the admin username. +~~~ + +## Roles + +The file driver does not have built in support for roles. If roles are important for your application you should look into a different driver or [develop](driver/develop) your own. \ No newline at end of file diff --git a/guide/auth/edit.md b/guide/auth/edit.md deleted file mode 100644 index e69de29..0000000 diff --git a/guide/auth/index.md b/guide/auth/index.md index e69de29..cda8529 100644 --- a/guide/auth/index.md +++ b/guide/auth/index.md @@ -0,0 +1,17 @@ +# Auth + +User authentication and authorization is provided by the auth module. + +The auth module is included with the Kohana 3.0 install, but needs to be enabled before you can use it. To enable, open your `application/bootstrap.php` file and modify the call to [Kohana::modules] by including the auth module like so: + +~~~ +Kohana::modules(array( + ... + 'auth' => MODPATH.'auth', + ... +)); +~~~ + +Next, you will then need to [configure](config) the auth module. + +The auth module provides a [Auth::File] driver but [drivers](driver/develop) can be easily added to fit your needs. diff --git a/guide/auth/login.md b/guide/auth/login.md index e69de29..7709ebd 100644 --- a/guide/auth/login.md +++ b/guide/auth/login.md @@ -0,0 +1,46 @@ +# Log in and out + +The auth module provides methods to help you log users in and out of your application. + +## Log in + +The [Auth::login] method with handle the login. + +~~~ +// Handled from a form with inputs of names email / password +$post = $this->request->post(); +$success = Auth::instance()->login($post['email'], $post['password']); + +if ($success) +{ + // Login successful, send to app +} +else +{ + // Login failed, send back to form with error message +} +~~~ + +## Logged in User + +To find the logged in use within you app you will call [Auth::get_user]. + +~~~ +$user = Auth::instance()->get_user(); + +// Check for a user (NULL if not user is found) +if ($user !== null) +{ + // User is found, continue on +} +else +{ + // User was not found, redirect to the login form +} +~~~ + +## Log out + +The [Auth::logout] method will take care of logging out a user. + + Auth::instance()->logout(); diff --git a/guide/auth/menu.md b/guide/auth/menu.md index 1708caa..10d0870 100644 --- a/guide/auth/menu.md +++ b/guide/auth/menu.md @@ -1,7 +1,5 @@ ## [Auth]() -- [Config](config) -- [User Model](user) -- [Register Users](register) +- [Configuration](config) - [Log in and out](login) -- [Edit User](edit) -- [Using Roles](roles) +- [File Driver](driver/file) +- [Developing Drivers](driver/develop) diff --git a/guide/auth/register.md b/guide/auth/register.md deleted file mode 100644 index e69de29..0000000 diff --git a/guide/auth/roles.md b/guide/auth/roles.md deleted file mode 100644 index e69de29..0000000 diff --git a/guide/auth/user.md b/guide/auth/user.md deleted file mode 100644 index e69de29..0000000 From b229d585861add656e5a15e0e9aaf4305335d824 Mon Sep 17 00:00:00 2001 From: Dave Widmer Date: Tue, 6 Dec 2011 15:53:07 -0500 Subject: [PATCH 05/10] Userguide reorganization and small copy editing. --- guide/auth/config.md | 12 ++++++------ guide/auth/driver/develop.md | 12 ++++++------ guide/auth/driver/file.md | 12 ++++-------- guide/auth/index.md | 2 +- guide/auth/login.md | 11 +++++++---- guide/auth/menu.md | 5 +++-- 6 files changed, 27 insertions(+), 27 deletions(-) diff --git a/guide/auth/config.md b/guide/auth/config.md index e1cb05b..af97acb 100644 --- a/guide/auth/config.md +++ b/guide/auth/config.md @@ -1,14 +1,14 @@ # Configuration -The default config file is located in `MODPATH/auth/config/auth.php`. You should copy this file to `APPPATH/config/auth.php` and make changes there, in keeping with the [cascading filesystem](../kohana/files). +The default configuration file is located in `MODPATH/auth/config/auth.php`. You should copy this file to `APPPATH/config/auth.php` and make changes there, in keeping with the [cascading filesystem](../kohana/files). -[Config merging](../kohana/config#config-merging) allows the default config settings to apply if you don't overwrite them in your application configuration file. +[Config merging](../kohana/config#config-merging) allows these default configuration settings to apply if you don't overwrite them in your application configuration file. Name | Type | Default | Description -----|------|---------|------------ driver | `string` | file | The name of the auth driver to use. -hash_method | `string` | sha256 | The hashing function to use. +hash_method | `string` | sha256 | The hashing function to use on the passwords. hash_key | `string` | NULL | The key to use when hashing the password. -lifetime | `int` | 1209600 | The time (in seconds) that the user session is valid without activity. -session_type | `string` | [Session::$default] | The type of session to use to store the auth user. -session_key | `string` | auth_user | The name of the session variable to save the user. +lifetime | `int` | 1209600 | The time (_in seconds_) that the user's session is valid. +session_type | `string` | [Session::$default] | The type of session to use when storing the auth user. +session_key | `string` | auth_user | The name of the session variable used to save the user. diff --git a/guide/auth/driver/develop.md b/guide/auth/driver/develop.md index 6d615eb..a69a08c 100644 --- a/guide/auth/driver/develop.md +++ b/guide/auth/driver/develop.md @@ -1,9 +1,15 @@ # Developing Drivers +## Real World Example + +Sometimes the best way to learn is to jump right in and read the code from another module. The [ORM](https://github.com/kohana/orm/blob/3.2/develop/classes/kohana/auth/orm.php) module comes with an auth driver you can learn from. + [!!] We will be developing an `example` driver. In your own driver you will substitute `example` with your driver name. This example file would be saved at `APPPATH/classes/auth/example.php` (or `MODPATH` if you are creating a module). +--- + ## Quick Example First we will show you a quick example and then break down what is going on. @@ -71,9 +77,3 @@ public function get_user($default = NULL) ## Activating the Driver After you create your driver you will want to use it. It is a easy as setting the `driver` [configuration](config) option to the name of your driver (in our case `example`). - -## Real World Examples - -Sometimes the best way to learn is to just read the code. Here are a auth drivers that you can take a look at. - -* [ORM](https://github.com/kohana/orm/blob/3.2/master/classes/kohana/auth/orm.php) diff --git a/guide/auth/driver/file.md b/guide/auth/driver/file.md index f2de024..7a6fa09 100644 --- a/guide/auth/driver/file.md +++ b/guide/auth/driver/file.md @@ -1,23 +1,19 @@ # File Driver -The [Auth::File] driver is the default driver when you activate the auth module. +The [Auth::File] driver is included with the auth module. Below are additional configuration options that can be set for this driver. Name | Type | Default | Description -----|------|---------|------------- -users | `array` | array() | A user => password (hashed) array of all the users in your application +users | `array` | array() | A user => password (_hashed_) array of all the users in your application ## Forcing Login [Auth_File::force_login] allows you to force a user login without a password. ~~~ -// Force the admin user to be logged in +// Force the user with a username of admin to be logged into your application Auth::instance()->force_login('admin'); -$user = Auth::instance()->get_user(); // Returns the user with the admin username. +$user = Auth::instance()->get_user(); ~~~ - -## Roles - -The file driver does not have built in support for roles. If roles are important for your application you should look into a different driver or [develop](driver/develop) your own. \ No newline at end of file diff --git a/guide/auth/index.md b/guide/auth/index.md index cda8529..200a806 100644 --- a/guide/auth/index.md +++ b/guide/auth/index.md @@ -14,4 +14,4 @@ Kohana::modules(array( Next, you will then need to [configure](config) the auth module. -The auth module provides a [Auth::File] driver but [drivers](driver/develop) can be easily added to fit your needs. +The auth module provides the [Auth::File] driver for you. As your application needs change you may need to find another driver or [develop](driver/develop) your own. diff --git a/guide/auth/login.md b/guide/auth/login.md index 7709ebd..123cb06 100644 --- a/guide/auth/login.md +++ b/guide/auth/login.md @@ -4,10 +4,10 @@ The auth module provides methods to help you log users in and out of your applic ## Log in -The [Auth::login] method with handle the login. +The [Auth::login] method handles the login. ~~~ -// Handled from a form with inputs of names email / password +// Handled from a form with inputs with names email / password $post = $this->request->post(); $success = Auth::instance()->login($post['email'], $post['password']); @@ -23,7 +23,7 @@ else ## Logged in User -To find the logged in use within you app you will call [Auth::get_user]. +To find the user that is logged in call [Auth::get_user]. ~~~ $user = Auth::instance()->get_user(); @@ -43,4 +43,7 @@ else The [Auth::logout] method will take care of logging out a user. - Auth::instance()->logout(); +~~~ +Auth::instance()->logout(); +// Redirect the user back to login page +~~~ diff --git a/guide/auth/menu.md b/guide/auth/menu.md index 10d0870..23fc0ee 100644 --- a/guide/auth/menu.md +++ b/guide/auth/menu.md @@ -1,5 +1,6 @@ ## [Auth]() - [Configuration](config) - [Log in and out](login) -- [File Driver](driver/file) -- [Developing Drivers](driver/develop) +- Drivers + - [File](driver/file) + - [Developing](driver/develop) From 521e3435c8ab929148253789c829114eb3a6a2b0 Mon Sep 17 00:00:00 2001 From: Dave Widmer Date: Mon, 12 Dec 2011 09:13:28 -0500 Subject: [PATCH 06/10] Integrating suggestions form the forum into the user guide. --- guide/auth/index.md | 4 +++- guide/auth/login.md | 15 ++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/guide/auth/index.md b/guide/auth/index.md index 200a806..b337c5c 100644 --- a/guide/auth/index.md +++ b/guide/auth/index.md @@ -14,4 +14,6 @@ Kohana::modules(array( Next, you will then need to [configure](config) the auth module. -The auth module provides the [Auth::File] driver for you. As your application needs change you may need to find another driver or [develop](driver/develop) your own. +The auth module provides the [Auth::File] driver for you. There is also an auth driver included with the ORM module. + +As your application needs change you may need to find another driver or [develop](driver/develop) your own. diff --git a/guide/auth/login.md b/guide/auth/login.md index 123cb06..1207b5d 100644 --- a/guide/auth/login.md +++ b/guide/auth/login.md @@ -23,7 +23,20 @@ else ## Logged in User -To find the user that is logged in call [Auth::get_user]. +There are two ways to check if a user is logged in. If you just need to check if the user is logged in use [Auth::logged_in]. + +~~~ +if (Auth::instance()->logged_in()) +{ + // User is logged in, continue on +} +else +{ + // User isn't logged in, redirect to the login form. +} +~~~ + +You can also get the logged in user object by using [Auth::get_user]. If the user is null, then no user was found. ~~~ $user = Auth::instance()->get_user(); From b2b19315db0dc69e099559a65c62d0ce940fafcd Mon Sep 17 00:00:00 2001 From: Kiall Mac Innes Date: Mon, 12 Dec 2011 19:17:15 +0000 Subject: [PATCH 07/10] Removed reference to Kohana "3.0" from the guide --- guide/auth/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guide/auth/index.md b/guide/auth/index.md index b337c5c..18127e6 100644 --- a/guide/auth/index.md +++ b/guide/auth/index.md @@ -2,7 +2,7 @@ User authentication and authorization is provided by the auth module. -The auth module is included with the Kohana 3.0 install, but needs to be enabled before you can use it. To enable, open your `application/bootstrap.php` file and modify the call to [Kohana::modules] by including the auth module like so: +The auth module is included with Kohana, but needs to be enabled before you can use it. To enable, open your `application/bootstrap.php` file and modify the call to [Kohana::modules] by including the auth module like so: ~~~ Kohana::modules(array( From 7ad3e737d8c7a43299a494bd338a837db6a69455 Mon Sep 17 00:00:00 2001 From: Kiall Mac Innes Date: Tue, 10 Jan 2012 19:04:33 +0000 Subject: [PATCH 08/10] Update @copyright notices to 2012. Fixes #4396. --- classes/kohana/auth.php | 2 +- classes/kohana/auth/file.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/kohana/auth.php b/classes/kohana/auth.php index c527dbb..9b30cb7 100644 --- a/classes/kohana/auth.php +++ b/classes/kohana/auth.php @@ -5,7 +5,7 @@ * * @package Kohana/Auth * @author Kohana Team - * @copyright (c) 2007-2010 Kohana Team + * @copyright (c) 2007-2012 Kohana Team * @license http://kohanaframework.org/license */ abstract class Kohana_Auth { diff --git a/classes/kohana/auth/file.php b/classes/kohana/auth/file.php index 00c5172..568fd0c 100644 --- a/classes/kohana/auth/file.php +++ b/classes/kohana/auth/file.php @@ -5,7 +5,7 @@ * * @package Kohana/Auth * @author Kohana Team - * @copyright (c) 2007-2010 Kohana Team + * @copyright (c) 2007-2012 Kohana Team * @license http://kohanaframework.org/license */ class Kohana_Auth_File extends Auth { From a981cf2b4906f821b72c2ca1b0f3a2f5268b034e Mon Sep 17 00:00:00 2001 From: Woody Gilk Date: Sun, 18 Mar 2012 11:34:03 -0500 Subject: [PATCH 09/10] Removing "lifetime" configuration and docs, it is not being used at all, just causing confusion --- config/auth.php | 1 - guide/auth/config.md | 1 - 2 files changed, 2 deletions(-) diff --git a/config/auth.php b/config/auth.php index ef712eb..f868e30 100644 --- a/config/auth.php +++ b/config/auth.php @@ -5,7 +5,6 @@ 'driver' => 'file', 'hash_method' => 'sha256', 'hash_key' => NULL, - 'lifetime' => 1209600, 'session_type' => Session::$default, 'session_key' => 'auth_user', diff --git a/guide/auth/config.md b/guide/auth/config.md index af97acb..e411fa0 100644 --- a/guide/auth/config.md +++ b/guide/auth/config.md @@ -9,6 +9,5 @@ Name | Type | Default | Description driver | `string` | file | The name of the auth driver to use. hash_method | `string` | sha256 | The hashing function to use on the passwords. hash_key | `string` | NULL | The key to use when hashing the password. -lifetime | `int` | 1209600 | The time (_in seconds_) that the user's session is valid. session_type | `string` | [Session::$default] | The type of session to use when storing the auth user. session_key | `string` | auth_user | The name of the session variable used to save the user. From 5ee08a93db03cb98a5c25c0a75dd5c9bd4de1847 Mon Sep 17 00:00:00 2001 From: Woody Gilk Date: Sun, 18 Mar 2012 22:00:09 -0500 Subject: [PATCH 10/10] Partial revert of a981cf2b4906f821b72c2ca1b0f3a2f5268b034e. Put "lifetime" back into auth config, apparantly ORM uses it for something completely unrelated --- config/auth.php | 1 + 1 file changed, 1 insertion(+) diff --git a/config/auth.php b/config/auth.php index f868e30..ef712eb 100644 --- a/config/auth.php +++ b/config/auth.php @@ -5,6 +5,7 @@ 'driver' => 'file', 'hash_method' => 'sha256', 'hash_key' => NULL, + 'lifetime' => 1209600, 'session_type' => Session::$default, 'session_key' => 'auth_user',