gatekeeper.php 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <?php
  2. return
  3. [
  4. /**
  5. * ---------------------------------------------------------
  6. * Identifier
  7. * ---------------------------------------------------------
  8. *
  9. * The supported identifier types are "email" and "username".
  10. */
  11. 'identifier' => 'username',
  12. /**
  13. * ---------------------------------------------------------
  14. * Auth key name
  15. * ---------------------------------------------------------
  16. *
  17. * Name of the session variable and cookie that holds the authentication key.
  18. * Using a unique key name name will prevent session collisions with other applications.
  19. */
  20. 'auth_key' => 'gatekeeper_auth_key',
  21. /**
  22. * ---------------------------------------------------------
  23. * User model
  24. * ---------------------------------------------------------
  25. */
  26. 'user_model' => 'mako\gatekeeper\entities\user\User',
  27. /**
  28. * ---------------------------------------------------------
  29. * Group model
  30. * ---------------------------------------------------------
  31. */
  32. 'group_model' => 'mako\gatekeeper\entities\group\Group',
  33. /**
  34. * ---------------------------------------------------------
  35. * Brute force throttling
  36. * ---------------------------------------------------------
  37. */
  38. 'throttling' =>
  39. [
  40. /**
  41. * Set to TRUE to enable brute force throttling.
  42. */
  43. 'enabled' => true,
  44. /**
  45. * Maximum number of attempts before the account gets temporarily locked.
  46. */
  47. 'max_attemps' => 5,
  48. /**
  49. * Number of seconds for which the account gets locked after reaching the maximum number of login attempts.
  50. */
  51. 'lock_time' => 60 * 5,
  52. ],
  53. /**
  54. * ---------------------------------------------------------
  55. * Cookie options
  56. * ---------------------------------------------------------
  57. */
  58. 'cookie_options' =>
  59. [
  60. /**
  61. * The path on the server in which the cookie will be available on.
  62. * If set to '/', the cookie will be available within the entire domain.
  63. * If set to '/foo/', the cookie will only be available within the /foo/ directory and all sub-directories.
  64. */
  65. 'path' => '/',
  66. /**
  67. * The domain that the cookie is available to.
  68. * To make the cookie available on all subdomains of example.org (including example.org itself) then you'd set it to '.example.org'.
  69. */
  70. 'domain' => '',
  71. /**
  72. * Indicates that the cookie should only be transmitted over a secure HTTPS connection from the client. When set to TRUE,
  73. * the cookie will only be set if a secure connection exists. On the server-side, it's on the programmer to send this kind of cookie
  74. * only on secure connection (e.g. with respect to $this->request->secure()).
  75. */
  76. 'secure' => false,
  77. /**
  78. * When TRUE the cookie will be made accessible only through the HTTP protocol.
  79. * This means that the cookie won't be accessible by scripting languages, such as JavaScript.
  80. * It has been suggested that this setting can effectively help to reduce identity theft through XSS attacks
  81. * (although it is not supported by all browsers), but that claim is often disputed.
  82. */
  83. 'httponly' => true,
  84. ],
  85. ];