| 
									
										
										
										
											2017-12-23 20:46:52 +01:00
										 |  |  | <?php | 
					
						
							| 
									
										
										
										
											2019-08-17 12:09:03 +02:00
										 |  |  | declare(strict_types=1); | 
					
						
							| 
									
										
										
										
											2017-12-23 20:46:52 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | return [ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /* | 
					
						
							|  |  |  |      * Auth container binding | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     'enabled' => true, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /* | 
					
						
							|  |  |  |      * Lifetime in minutes. | 
					
						
							|  |  |  |      * In case you need your users to be asked for a new one time passwords from time to time. | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     'lifetime' => 0, // 0 = eternal
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /* | 
					
						
							|  |  |  |      * Renew lifetime at every new request. | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     'keep_alive' => true, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /* | 
					
						
							|  |  |  |      * Auth container binding | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     'auth' => 'auth', | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /* | 
					
						
							|  |  |  |      * 2FA verified session var | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-03 19:49:32 +02:00
										 |  |  |     'session_var' => 'google2fa', | 
					
						
							| 
									
										
										
										
											2017-12-23 20:46:52 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /* | 
					
						
							|  |  |  |      * One Time Password request input name | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2019-08-03 19:49:32 +02:00
										 |  |  |     'otp_input' => 'one_time_password', | 
					
						
							| 
									
										
										
										
											2017-12-23 20:46:52 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /* | 
					
						
							|  |  |  |      * One Time Password Window | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2019-08-03 19:49:32 +02:00
										 |  |  |     'window' => 1, | 
					
						
							| 
									
										
										
										
											2017-12-23 20:46:52 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /* | 
					
						
							|  |  |  |      * Forbid user to reuse One Time Passwords. | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  |     'forbid_old_passwords' => false, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /* | 
					
						
							|  |  |  |      * User's table column for google2fa secret | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2019-08-03 19:49:32 +02:00
										 |  |  |     'otp_secret_column' => 'mfa_secret', | 
					
						
							| 
									
										
										
										
											2017-12-23 20:46:52 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /* | 
					
						
							|  |  |  |      * One Time Password View | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2019-08-03 19:49:32 +02:00
										 |  |  |     'view' => 'auth.mfa', | 
					
						
							| 
									
										
										
										
											2017-12-23 20:46:52 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /* | 
					
						
							|  |  |  |      * One Time Password error message | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2019-08-03 19:49:32 +02:00
										 |  |  |     'error_messages' => [ | 
					
						
							| 
									
										
										
										
											2017-12-23 20:46:52 +01:00
										 |  |  |         'wrong_otp' => "The 'One Time Password' typed was wrong.", | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-03 19:49:32 +02:00
										 |  |  |     /* | 
					
						
							|  |  |  |      * Throw exceptions or just fire events? | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  |     'throw_exceptions' => true, | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-23 20:46:52 +01:00
										 |  |  | ]; |