Advertisement
Guest User

Untitled

a guest
Mar 27th, 2019
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.25 KB | None | 0 0
  1. security:
  2.  
  3. role_hierarchy:
  4. ROLE_FREELANCER: ROLE_USER
  5. ROLE_MANAGER: ROLE_USER
  6. ROLE_SUPER_MANAGER: ROLE_MANAGER
  7. ROLE_ADMIN: ROLE_USER
  8. ROLE_SUPER_ADMIN: [ ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH ]
  9.  
  10. encoders:
  11. App\Entity\User:
  12. algorithm: bcrypt
  13.  
  14. # https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers
  15. providers:
  16. entity_provider:
  17. entity:
  18. class: App\Entity\User
  19. property: username
  20.  
  21. firewalls:
  22. dev:
  23. pattern: ^/(_(profiler|wdt)|css|images|js)/
  24. security: false
  25.  
  26. docs:
  27. pattern: ^/api/docs
  28. anonymous: true
  29.  
  30. register:
  31. pattern: ^/api/register
  32. stateless: true
  33. anonymous: true
  34.  
  35. forgot_password:
  36. pattern: ^/api/forgot-password
  37. stateless: true
  38. anonymous: true
  39.  
  40. reset_password:
  41. pattern: ^/api/reset-password.*
  42. stateless: true
  43. anonymous: true
  44.  
  45. verify_token:
  46. pattern: ^/api/verify.*
  47. stateless: true
  48. anonymous: true
  49.  
  50. profile_login:
  51. pattern: ^/api/profile_login.*
  52. stateless: true
  53. anonymous: true
  54.  
  55. linkedin_login:
  56. pattern: ^/api/linkedin_login.*
  57. stateless: true
  58. anonymous: true
  59.  
  60. chat_token:
  61. pattern: ^/api/chat_token
  62. stateless: true
  63. anonymous: true
  64.  
  65. login:
  66. pattern: ^/api/login
  67. stateless: true
  68. anonymous: true
  69. provider: entity_provider
  70. json_login:
  71. check_path: /api/login
  72. username_path: email
  73. password_path: password
  74. success_handler: lexik_jwt_authentication.handler.authentication_success
  75. failure_handler: lexik_jwt_authentication.handler.authentication_failure
  76. require_previous_session: false
  77.  
  78. api:
  79. pattern: ^/api
  80. stateless: true
  81. anonymous: false
  82. provider: entity_provider
  83. guard:
  84. authenticators:
  85. - lexik_jwt_authentication.jwt_token_authenticator
  86.  
  87. access_control:
  88. - { path: ^/api/docs, roles: IS_AUTHENTICATED_ANONYMOUSLY }
  89. - { path: ^/api/register, roles: IS_AUTHENTICATED_ANONYMOUSLY }
  90. - { path: ^/api/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
  91. - { path: ^/api/forgot-password, roles: IS_AUTHENTICATED_ANONYMOUSLY }
  92. - { path: ^/api/reset-password.*, roles: IS_AUTHENTICATED_ANONYMOUSLY }
  93. - { path: ^/api/verify.*, roles: IS_AUTHENTICATED_ANONYMOUSLY }
  94. - { path: ^/api/profile_login.*, roles: IS_AUTHENTICATED_ANONYMOUSLY }
  95. - { path: ^/api/linkedin_login.*, roles: IS_AUTHENTICATED_ANONYMOUSLY }
  96. - { path: ^/api/chat_token, roles: IS_AUTHENTICATED_ANONYMOUSLY }
  97. - { path: ^/api, roles: IS_AUTHENTICATED_FULLY }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement