1+ <?php
2+ /**
3+ * ██████╗ ██╗ ██╗██████╗ ███╗ ███╗ ██████╗ ███╗ ██╗███████╗████████╗███████╗██████╗ ███████╗
4+ * ██╔══██╗██║ ██║██╔══██╗ ████╗ ████║██╔═══██╗████╗ ██║██╔════╝╚══██╔══╝██╔════╝██╔══██╗██╔════╝
5+ * ██████╔╝███████║██████╔╝ ██╔████╔██║██║ ██║██╔██╗ ██║███████╗ ██║ █████╗ ██████╔╝███████╗
6+ * ██╔═══╝ ██╔══██║██╔═══╝ ██║╚██╔╝██║██║ ██║██║╚██╗██║╚════██║ ██║ ██╔══╝ ██╔══██╗╚════██║
7+ * ██║ ██║ ██║██║ ██║ ╚═╝ ██║╚██████╔╝██║ ╚████║███████║ ██║ ███████╗██║ ██║███████║
8+ * ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝╚══════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝╚══════╝
9+ * https://github.com/php-monsters/
10+ */
11+ return [
12+
13+ /*
14+ * The format option allows you to decide
15+ * which generator implementation to be used when
16+ * generating new passwords.
17+ *
18+ * Here are the options:
19+ * - string
20+ * - numeric
21+ * - numeric-no-zero
22+ * - customize
23+ */
24+
25+ 'format ' => env ('OTP_FORMAT ' , 'string ' ),
26+
27+ /*
28+ * The customize option required when option is customize.
29+ */
30+
31+ 'customize ' => '123456789ABCDEFG@#$% ' ,
32+
33+ /*
34+ * The length of the password.
35+ */
36+
37+ 'length ' => env ('OTP_LENGTH ' , 6 ),
38+
39+ /*
40+ * The separator of the password.
41+ */
42+
43+ 'separator ' => '- ' ,
44+
45+ /*
46+ * Requiring correct input of uppercase and lowercase letters.
47+ */
48+
49+ 'sensitive ' => env ('OTP_SENSITIVE ' , false ),
50+
51+ /*
52+ * The expiry time of the password in minutes.
53+ */
54+
55+ 'expires ' => env ('OTP_EXPIRES_TIME ' , 15 ),
56+
57+ /*
58+ * The number of incorrect password attempts.
59+ */
60+
61+ 'attempts ' => env ('OTP_ATTEMPT_TIMES ' , 5 ),
62+
63+ /*
64+ * The repeated password.
65+ * The previous password is valid when new password generated
66+ * until either one password used or itself expired.
67+ */
68+
69+ 'repeated ' => env ('OTP_REPEATED ' , true ),
70+
71+ /*
72+ * The disposable of the Otp identifier.
73+ * The different password is not valid when same identifier password used.
74+ */
75+
76+ 'disposable ' => true ,
77+
78+ /*
79+ * The prefix of the cache key to be used to store.
80+ */
81+
82+ 'prefix ' => 'OTPPX_ ' ,
83+
84+ /*
85+ * Demo mode for development purposes, no need to use real password to validate.
86+ */
87+
88+ 'demo ' => env ('OTP_DEMO ' , false ),
89+ 'demo_passwords ' => ['1234 ' ,'123456 ' ,'12345678 ' ]
90+
91+ ];
0 commit comments