7d2ad027263483e783050606ad152b8b.yaml.php 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533
  1. <?php
  2. return [
  3. '@class' => 'Grav\\Common\\File\\CompiledYamlFile',
  4. 'filename' => '/var/www/html/user/plugins/login/blueprints.yaml',
  5. 'modified' => 1591823843,
  6. 'data' => [
  7. 'name' => 'Login',
  8. 'slug' => 'login',
  9. 'type' => 'plugin',
  10. 'version' => '3.3.5',
  11. 'testing' => false,
  12. 'description' => 'Enables user authentication and login screen.',
  13. 'icon' => 'sign-in',
  14. 'author' => [
  15. 'name' => 'Team Grav',
  16. 'email' => 'devs@getgrav.org',
  17. 'url' => 'http://getgrav.org'
  18. ],
  19. 'homepage' => 'https://github.com/getgrav/grav-plugin-login',
  20. 'keywords' => 'login, authentication, admin, security',
  21. 'bugs' => 'https://github.com/getgrav/grav-plugin-login/issues',
  22. 'license' => 'MIT',
  23. 'dependencies' => [
  24. 0 => [
  25. 'name' => 'grav',
  26. 'version' => '>=1.6.7'
  27. ],
  28. 1 => [
  29. 'name' => 'form',
  30. 'version' => '>=3.0.0'
  31. ],
  32. 2 => [
  33. 'name' => 'email',
  34. 'version' => '>=3.0.0'
  35. ]
  36. ],
  37. 'form' => [
  38. 'validation' => 'loose',
  39. 'fields' => [
  40. 'tabs' => [
  41. 'type' => 'tabs',
  42. 'active' => 1,
  43. 'class' => 'subtle',
  44. 'fields' => [
  45. 'options' => [
  46. 'type' => 'tab',
  47. 'title' => 'PLUGIN_LOGIN.OPTIONS',
  48. 'fields' => [
  49. 'enabled' => [
  50. 'type' => 'hidden',
  51. 'label' => 'PLUGIN_LOGIN.PLUGIN_STATUS',
  52. 'highlight' => 1,
  53. 'default' => 1,
  54. 'options' => [
  55. 1 => 'PLUGIN_ADMIN.ENABLED',
  56. 0 => 'PLUGIN_ADMIN.DISABLED'
  57. ],
  58. 'validate' => [
  59. 'type' => 'bool'
  60. ]
  61. ],
  62. 'built_in_css' => [
  63. 'type' => 'toggle',
  64. 'label' => 'PLUGIN_LOGIN.BUILTIN_CSS',
  65. 'highlight' => 1,
  66. 'default' => 1,
  67. 'help' => 'PLUGIN_LOGIN.BUILTIN_CSS_HELP',
  68. 'options' => [
  69. 1 => 'PLUGIN_ADMIN.ENABLED',
  70. 0 => 'PLUGIN_ADMIN.DISABLED'
  71. ],
  72. 'validate' => [
  73. 'type' => 'bool'
  74. ]
  75. ],
  76. 'redirect_to_login' => [
  77. 'type' => 'toggle',
  78. 'label' => 'PLUGIN_LOGIN.REDIRECT_TO_LOGIN',
  79. 'help' => 'PLUGIN_LOGIN.REDIRECT_TO_LOGIN_HELP',
  80. 'default' => 0,
  81. 'highlight' => 0,
  82. 'options' => [
  83. 1 => 'PLUGIN_ADMIN.ENABLED',
  84. 0 => 'PLUGIN_ADMIN.DISABLED'
  85. ],
  86. 'validate' => [
  87. 'type' => 'bool'
  88. ]
  89. ],
  90. 'redirect_after_login' => [
  91. 'type' => 'toggle',
  92. 'label' => 'PLUGIN_LOGIN.REDIRECT_AFTER_LOGIN',
  93. 'help' => 'PLUGIN_LOGIN.REDIRECT_AFTER_LOGIN_HELP',
  94. 'force_bool' => true,
  95. 'default' => 0,
  96. 'highlight' => 0,
  97. 'options' => [
  98. 1 => 'PLUGIN_ADMIN.ENABLED',
  99. 0 => 'PLUGIN_ADMIN.DISABLED'
  100. ],
  101. 'validate' => [
  102. 'type' => 'bool'
  103. ]
  104. ],
  105. 'redirect_after_logout' => [
  106. 'type' => 'toggle',
  107. 'label' => 'PLUGIN_LOGIN.REDIRECT_AFTER_LOGOUT',
  108. 'help' => 'PLUGIN_LOGIN.REDIRECT_AFTER_LOGOUT_HELP',
  109. 'force_bool' => true,
  110. 'default' => 1,
  111. 'highlight' => 1,
  112. 'options' => [
  113. 1 => 'PLUGIN_ADMIN.ENABLED',
  114. 0 => 'PLUGIN_ADMIN.DISABLED'
  115. ],
  116. 'validate' => [
  117. 'type' => 'bool'
  118. ]
  119. ],
  120. 'parent_acl' => [
  121. 'type' => 'toggle',
  122. 'label' => 'PLUGIN_LOGIN.USE_PARENT_ACL_LABEL',
  123. 'highlight' => 0,
  124. 'default' => 0,
  125. 'help' => 'PLUGIN_LOGIN.USE_PARENT_ACL_HELP',
  126. 'options' => [
  127. 1 => 'PLUGIN_ADMIN.ENABLED',
  128. 0 => 'PLUGIN_ADMIN.DISABLED'
  129. ],
  130. 'validate' => [
  131. 'type' => 'bool'
  132. ]
  133. ],
  134. 'dynamic_page_visibility' => [
  135. 'type' => 'toggle',
  136. 'label' => 'PLUGIN_LOGIN.DYNAMIC_VISIBILITY',
  137. 'highlight' => 0,
  138. 'default' => 0,
  139. 'help' => 'PLUGIN_LOGIN.DYNAMIC_VISIBILITY_HELP',
  140. 'options' => [
  141. 1 => 'PLUGIN_ADMIN.ENABLED',
  142. 0 => 'PLUGIN_ADMIN.DISABLED'
  143. ],
  144. 'validate' => [
  145. 'type' => 'bool'
  146. ]
  147. ],
  148. 'twofa_enabled' => [
  149. 'type' => 'toggle',
  150. 'label' => 'PLUGIN_LOGIN.2FA_ENABLED',
  151. 'highlight' => 0,
  152. 'default' => 0,
  153. 'help' => 'PLUGIN_LOGIN.2FA_ENABLED_HELP',
  154. 'options' => [
  155. 1 => 'PLUGIN_ADMIN.ENABLED',
  156. 0 => 'PLUGIN_ADMIN.DISABLED'
  157. ],
  158. 'validate' => [
  159. 'type' => 'bool'
  160. ]
  161. ],
  162. 'protect_protected_page_media' => [
  163. 'type' => 'toggle',
  164. 'label' => 'PLUGIN_LOGIN.PROTECT_PROTECTED_PAGE_MEDIA_LABEL',
  165. 'highlight' => 0,
  166. 'default' => 0,
  167. 'help' => 'PLUGIN_LOGIN.PROTECT_PROTECTED_PAGE_MEDIA_HELP',
  168. 'options' => [
  169. 1 => 'PLUGIN_ADMIN.ENABLED',
  170. 0 => 'PLUGIN_ADMIN.DISABLED'
  171. ],
  172. 'validate' => [
  173. 'type' => 'bool'
  174. ]
  175. ],
  176. 'session_user_sync' => [
  177. 'type' => 'toggle',
  178. 'label' => 'PLUGIN_LOGIN.SESSION_USER_SYNC',
  179. 'highlight' => 0,
  180. 'default' => 0,
  181. 'help' => 'PLUGIN_LOGIN.SESSION_USER_SYNC_HELP',
  182. 'options' => [
  183. 1 => 'PLUGIN_ADMIN.ENABLED',
  184. 0 => 'PLUGIN_ADMIN.DISABLED'
  185. ],
  186. 'validate' => [
  187. 'type' => 'bool'
  188. ]
  189. ],
  190. 'rememberme' => [
  191. 'type' => 'section',
  192. 'title' => 'PLUGIN_LOGIN.REMEMBER_ME',
  193. 'fields' => [
  194. 'rememberme.enabled' => [
  195. 'type' => 'toggle',
  196. 'label' => 'PLUGIN_ADMIN.ENABLED',
  197. 'help' => 'PLUGIN_ADMIN.SESSION_ENABLED_HELP',
  198. 'highlight' => 1,
  199. 'options' => [
  200. 1 => 'PLUGIN_ADMIN.YES',
  201. 0 => 'PLUGIN_ADMIN.NO'
  202. ],
  203. 'validate' => [
  204. 'type' => 'bool'
  205. ]
  206. ],
  207. 'rememberme.timeout' => [
  208. 'type' => 'text',
  209. 'size' => 'small',
  210. 'default' => 604800,
  211. 'label' => 'PLUGIN_ADMIN.TIMEOUT',
  212. 'help' => 'PLUGIN_LOGIN.TIMEOUT_HELP',
  213. 'validate' => [
  214. 'type' => 'number',
  215. 'min' => 1
  216. ]
  217. ],
  218. 'rememberme.name' => [
  219. 'type' => 'text',
  220. 'size' => 'small',
  221. 'label' => 'PLUGIN_ADMIN.NAME',
  222. 'help' => 'PLUGIN_ADMIN.SESSION_NAME_HELP'
  223. ]
  224. ]
  225. ]
  226. ]
  227. ],
  228. 'routes' => [
  229. 'type' => 'tab',
  230. 'title' => 'PLUGIN_LOGIN.ROUTES',
  231. 'fields' => [
  232. 'route' => [
  233. 'type' => 'text',
  234. 'size' => 'medium',
  235. 'label' => 'PLUGIN_LOGIN.ROUTE',
  236. 'help' => 'PLUGIN_LOGIN.ROUTE_HELP',
  237. 'placeholder' => '/login'
  238. ],
  239. 'route_after_login' => [
  240. 'type' => 'text',
  241. 'size' => 'medium',
  242. 'label' => 'PLUGIN_LOGIN.ROUTE_AFTER_LOGIN',
  243. 'help' => 'PLUGIN_LOGIN.ROUTE_AFTER_LOGIN_HELP',
  244. 'data-default@' => '\\Grav\\Plugin\\LoginPlugin::defaultRedirectAfterLogin',
  245. 'placeholder' => '/user_profile'
  246. ],
  247. 'route_after_logout' => [
  248. 'type' => 'text',
  249. 'size' => 'medium',
  250. 'label' => 'PLUGIN_LOGIN.ROUTE_AFTER_LOGOUT',
  251. 'help' => 'PLUGIN_LOGIN.ROUTE_AFTER_LOGOUT_HELP',
  252. 'data-default@' => '\\Grav\\Plugin\\LoginPlugin::defaultRedirectAfterLogout',
  253. 'placeholder' => '/'
  254. ],
  255. 'route_forgot' => [
  256. 'type' => 'text',
  257. 'size' => 'medium',
  258. 'label' => 'PLUGIN_LOGIN.ROUTE_FORGOT',
  259. 'placeholder' => '/forgot_password'
  260. ],
  261. 'route_reset' => [
  262. 'type' => 'text',
  263. 'size' => 'medium',
  264. 'label' => 'PLUGIN_LOGIN.ROUTE_RESET',
  265. 'placeholder' => '/reset_password'
  266. ],
  267. 'route_profile' => [
  268. 'type' => 'text',
  269. 'size' => 'medium',
  270. 'label' => 'PLUGIN_LOGIN.ROUTE_PROFILE',
  271. 'placeholder' => '/user_profile'
  272. ],
  273. 'route_activate' => [
  274. 'type' => 'text',
  275. 'size' => 'medium',
  276. 'label' => 'PLUGIN_LOGIN.ROUTE_ACTIVATE',
  277. 'placeholder' => '/activate_user'
  278. ],
  279. 'user_registration.redirect_after_activation' => [
  280. 'type' => 'text',
  281. 'size' => 'medium',
  282. 'label' => 'PLUGIN_LOGIN.REDIRECT_AFTER_ACTIVATION',
  283. 'help' => 'PLUGIN_LOGIN.REDIRECT_AFTER_ACTIVATION_HELP',
  284. 'placeholder' => '/page-to-show-after-activation'
  285. ],
  286. 'route_register' => [
  287. 'type' => 'text',
  288. 'size' => 'medium',
  289. 'label' => 'PLUGIN_LOGIN.ROUTE_REGISTER',
  290. 'help' => 'PLUGIN_LOGIN.ROUTE_REGISTER_HELP',
  291. 'placeholder' => '/register'
  292. ],
  293. 'user_registration.redirect_after_registration' => [
  294. 'type' => 'text',
  295. 'size' => 'medium',
  296. 'label' => 'PLUGIN_LOGIN.REDIRECT_AFTER_REGISTRATION',
  297. 'help' => 'PLUGIN_LOGIN.REDIRECT_AFTER_REGISTRATION_HELP',
  298. 'placeholder' => '/page-to-show-after-registration'
  299. ]
  300. ]
  301. ],
  302. 'registration' => [
  303. 'type' => 'tab',
  304. 'title' => 'PLUGIN_LOGIN.USER_REGISTRATION',
  305. 'fields' => [
  306. 'user_registration.enabled' => [
  307. 'type' => 'toggle',
  308. 'label' => 'PLUGIN_ADMIN.ENABLED',
  309. 'help' => 'PLUGIN_LOGIN.USER_REGISTRATION_ENABLED_HELP',
  310. 'highlight' => 0,
  311. 'options' => [
  312. 1 => 'PLUGIN_ADMIN.YES',
  313. 0 => 'PLUGIN_ADMIN.NO'
  314. ],
  315. 'validate' => [
  316. 'type' => 'bool'
  317. ]
  318. ],
  319. 'registration_fields' => [
  320. 'type' => 'section',
  321. 'title' => 'PLUGIN_LOGIN.REGISTRATION_FIELDS',
  322. 'fields' => [
  323. 'user_registration.fields' => [
  324. 'type' => 'array',
  325. 'value_only' => true,
  326. 'label' => 'PLUGIN_LOGIN.REGISTRATION_FIELDS',
  327. 'help' => 'PLUGIN_LOGIN.REGISTRATION_FIELDS_HELP',
  328. 'placeholder_key' => 'PLUGIN_LOGIN.REGISTRATION_FIELD_KEY',
  329. 'placeholder_value' => 'PLUGIN_LOGIN.ADDITIONAL_PARAM_VALUE'
  330. ],
  331. 'user_registration.default_values' => [
  332. 'type' => 'array',
  333. 'label' => 'PLUGIN_LOGIN.DEFAULT_VALUES',
  334. 'help' => 'PLUGIN_LOGIN.DEFAULT_VALUES_HELP',
  335. 'placeholder_key' => 'PLUGIN_LOGIN.ADDITIONAL_PARAM_KEY',
  336. 'placeholder_value' => 'PLUGIN_LOGIN.ADDITIONAL_PARAM_VALUE'
  337. ]
  338. ]
  339. ],
  340. 'access_levels' => [
  341. 'title' => 'PLUGIN_ADMIN.ACCESS_LEVELS',
  342. 'type' => 'section',
  343. 'security' => 'admin.super',
  344. 'fields' => [
  345. 'user_registration.groups' => [
  346. 'type' => 'select',
  347. 'multiple' => true,
  348. 'size' => 'large',
  349. 'label' => 'PLUGIN_ADMIN.GROUPS',
  350. 'data-options@' => '\\Grav\\Common\\User\\Group::groupNames',
  351. 'classes' => 'fancy',
  352. 'help' => 'PLUGIN_LOGIN.GROUPS_HELP',
  353. 'validate' => [
  354. 'type' => 'commalist'
  355. ]
  356. ],
  357. 'user_registration.access.site' => [
  358. 'type' => 'array',
  359. 'label' => 'PLUGIN_ADMIN.SITE_ACCESS',
  360. 'help' => 'PLUGIN_LOGIN.SITE_ACCESS_HELP',
  361. 'multiple' => false,
  362. 'validate' => [
  363. 'type' => 'array'
  364. ]
  365. ]
  366. ]
  367. ],
  368. 'options' => [
  369. 'type' => 'section',
  370. 'title' => 'PLUGIN_LOGIN.OPTIONS',
  371. 'fields' => [
  372. 'user_registration.options.validate_password1_and_password2' => [
  373. 'type' => 'toggle',
  374. 'label' => 'PLUGIN_LOGIN.VALIDATE_PASSWORD1_AND_PASSWORD2',
  375. 'help' => 'PLUGIN_LOGIN.VALIDATE_PASSWORD1_AND_PASSWORD2_HELP',
  376. 'highlight' => 1,
  377. 'options' => [
  378. 1 => 'PLUGIN_ADMIN.YES',
  379. 0 => 'PLUGIN_ADMIN.NO'
  380. ],
  381. 'validate' => [
  382. 'type' => 'bool'
  383. ]
  384. ],
  385. 'user_registration.options.set_user_disabled' => [
  386. 'type' => 'toggle',
  387. 'label' => 'PLUGIN_LOGIN.SET_USER_DISABLED',
  388. 'help' => 'PLUGIN_LOGIN.SET_USER_DISABLED_HELP',
  389. 'highlight' => 0,
  390. 'options' => [
  391. 1 => 'PLUGIN_ADMIN.YES',
  392. 0 => 'PLUGIN_ADMIN.NO'
  393. ],
  394. 'validate' => [
  395. 'type' => 'bool'
  396. ]
  397. ],
  398. 'user_registration.options.login_after_registration' => [
  399. 'type' => 'toggle',
  400. 'label' => 'PLUGIN_LOGIN.LOGIN_AFTER_REGISTRATION',
  401. 'help' => 'PLUGIN_LOGIN.LOGIN_AFTER_REGISTRATION_HELP',
  402. 'highlight' => 0,
  403. 'options' => [
  404. 1 => 'PLUGIN_ADMIN.YES',
  405. 0 => 'PLUGIN_ADMIN.NO'
  406. ],
  407. 'validate' => [
  408. 'type' => 'bool'
  409. ]
  410. ],
  411. 'user_registration.options.send_activation_email' => [
  412. 'type' => 'toggle',
  413. 'label' => 'PLUGIN_LOGIN.SEND_ACTIVATION_EMAIL',
  414. 'help' => 'PLUGIN_LOGIN.SEND_ACTIVATION_EMAIL_HELP',
  415. 'highlight' => 0,
  416. 'options' => [
  417. 1 => 'PLUGIN_ADMIN.YES',
  418. 0 => 'PLUGIN_ADMIN.NO'
  419. ],
  420. 'validate' => [
  421. 'type' => 'bool'
  422. ]
  423. ],
  424. 'user_registration.options.manually_enable' => [
  425. 'type' => 'toggle',
  426. 'label' => 'PLUGIN_LOGIN.MANUALLY_ENABLE',
  427. 'help' => 'PLUGIN_LOGIN.MANUALLY_ENABLE_HELP',
  428. 'highlight' => 0,
  429. 'options' => [
  430. 1 => 'PLUGIN_ADMIN.YES',
  431. 0 => 'PLUGIN_ADMIN.NO'
  432. ],
  433. 'validate' => [
  434. 'type' => 'bool'
  435. ]
  436. ],
  437. 'user_registration.options.send_notification_email' => [
  438. 'type' => 'toggle',
  439. 'label' => 'PLUGIN_LOGIN.SEND_NOTIFICATION_EMAIL',
  440. 'help' => 'PLUGIN_LOGIN.SEND_NOTIFICATION_EMAIL_HELP',
  441. 'highlight' => 0,
  442. 'options' => [
  443. 1 => 'PLUGIN_ADMIN.YES',
  444. 0 => 'PLUGIN_ADMIN.NO'
  445. ],
  446. 'validate' => [
  447. 'type' => 'bool'
  448. ]
  449. ],
  450. 'user_registration.options.send_welcome_email' => [
  451. 'type' => 'toggle',
  452. 'label' => 'PLUGIN_LOGIN.SEND_WELCOME_EMAIL',
  453. 'help' => 'PLUGIN_LOGIN.SEND_WELCOME_EMAIL_HELP',
  454. 'highlight' => 0,
  455. 'options' => [
  456. 1 => 'PLUGIN_ADMIN.YES',
  457. 0 => 'PLUGIN_ADMIN.NO'
  458. ],
  459. 'validate' => [
  460. 'type' => 'bool'
  461. ]
  462. ]
  463. ]
  464. ]
  465. ]
  466. ],
  467. 'Security' => [
  468. 'type' => 'tab',
  469. 'title' => 'PLUGIN_LOGIN.SECURITY_TAB',
  470. 'fields' => [
  471. 'max_pw_resets_count' => [
  472. 'type' => 'number',
  473. 'size' => 'x-small',
  474. 'label' => 'PLUGIN_LOGIN.MAX_RESETS_COUNT',
  475. 'help' => 'PLUGIN_LOGIN.MAX_RESETS_COUNT_HELP',
  476. 'append' => 'PLUGIN_LOGIN.RESETS',
  477. 'validate' => [
  478. 'type' => 'number',
  479. 'min' => 0
  480. ]
  481. ],
  482. 'max_pw_resets_interval' => [
  483. 'type' => 'number',
  484. 'size' => 'x-small',
  485. 'label' => 'PLUGIN_LOGIN.MAX_RESETS_INTERVAL',
  486. 'help' => 'PLUGIN_LOGIN.MAX_RESETS_INTERVAL_HELP',
  487. 'append' => 'PLUGIN_LOGIN.MINUTES',
  488. 'validate' => [
  489. 'type' => 'number',
  490. 'min' => 1
  491. ]
  492. ],
  493. 'max_login_count' => [
  494. 'type' => 'number',
  495. 'size' => 'x-small',
  496. 'label' => 'PLUGIN_LOGIN.MAX_LOGINS_COUNT',
  497. 'help' => 'PLUGIN_LOGIN.MAX_LOGINS_COUNT_HELP',
  498. 'append' => 'PLUGIN_LOGIN.ATTEMPTS',
  499. 'validate' => [
  500. 'type' => 'number',
  501. 'min' => 0
  502. ]
  503. ],
  504. 'max_login_interval' => [
  505. 'type' => 'number',
  506. 'size' => 'x-small',
  507. 'label' => 'PLUGIN_LOGIN.MAX_LOGINS_INTERVAL',
  508. 'help' => 'PLUGIN_LOGIN.MAX_LOGINS_INTERVAL_HELP',
  509. 'append' => 'PLUGIN_LOGIN.MINUTES',
  510. 'validate' => [
  511. 'type' => 'number',
  512. 'min' => 1
  513. ]
  514. ],
  515. 'ipv6_subnet_size' => [
  516. 'type' => 'number',
  517. 'size' => 'x-small',
  518. 'label' => 'PLUGIN_LOGIN.IPV6_SUBNET_SIZE',
  519. 'help' => 'PLUGIN_LOGIN.IPV6_SUBNET_SIZE_HELP',
  520. 'append' => 'PLUGIN_LOGIN.MINUTES',
  521. 'validate' => [
  522. 'type' => 'number',
  523. 'min' => 1
  524. ]
  525. ]
  526. ]
  527. ]
  528. ]
  529. ]
  530. ]
  531. ]
  532. ]
  533. ];