Advertisement
Guest User

Untitled

a guest
Jul 2nd, 2017
537
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.27 KB | None | 0 0
  1. imports:
  2. - { resource: parameters.yml }
  3. - { resource: security.yml }
  4. - { resource: services.yml }
  5.  
  6. # Put parameters here that don't need to change on each machine where the app is deployed
  7. # https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
  8. parameters:
  9. locale: en
  10.  
  11. framework:
  12. #esi: ~
  13. translator: ~
  14. secret: '%secret%'
  15. router:
  16. resource: '%kernel.project_dir%/app/config/routing.yml'
  17. strict_requirements: ~
  18. form: ~
  19. csrf_protection: ~
  20. validation: { enable_annotations: true }
  21. #serializer: { enable_annotations: true }
  22. templating:
  23. engines: ['twig']
  24. default_locale: '%locale%'
  25. trusted_hosts: ~
  26. session:
  27. # https://symfony.com/doc/current/reference/configuration/framework.html#handler-id
  28. handler_id: session.handler.native_file
  29. save_path: '%kernel.project_dir%/var/sessions/%kernel.environment%'
  30. fragments: ~
  31. http_method_override: true
  32. assets: ~
  33. php_errors:
  34. log: true
  35.  
  36. # Twig Configuration
  37. twig:
  38. debug: '%kernel.debug%'
  39. strict_variables: '%kernel.debug%'
  40.  
  41. # Doctrine Configuration
  42. doctrine:
  43. dbal:
  44. driver: pdo_mysql
  45. host: '%database_host%'
  46. port: '%database_port%'
  47. dbname: '%database_name%'
  48. user: '%database_user%'
  49. password: '%database_password%'
  50. charset: UTF8
  51. # if using pdo_sqlite as your database driver:
  52. # 1. add the path in parameters.yml
  53. # e.g. database_path: "%kernel.project_dir%/var/data/data.sqlite"
  54. # 2. Uncomment database_path in parameters.yml.dist
  55. # 3. Uncomment next line:
  56. #path: '%database_path%'
  57.  
  58. orm:
  59. auto_generate_proxy_classes: '%kernel.debug%'
  60. naming_strategy: doctrine.orm.naming_strategy.underscore
  61. auto_mapping: true
  62.  
  63. # Swiftmailer Configuration
  64. swiftmailer:
  65. transport: '%mailer_transport%'
  66. host: '%mailer_host%'
  67. username: '%mailer_user%'
  68. password: '%mailer_password%'
  69. spool: { type: memory }
  70.  
  71. lexik_jwt_authentication:
  72. private_key_path: '%jwt_private_key_path%'
  73. public_key_path: '%jwt_public_key_path%'
  74. pass_phrase: '%jwt_key_pass_phrase%'
  75. token_ttl: '%jwt_token_ttl%'
  76.  
  77. fos_user:
  78. db_driver: orm # other valid values are 'mongodb', 'couchdb' and 'propel'
  79. firewall_name: main
  80. user_class: AppBundleEntityUser
  81. from_email:
  82. address: admin200@tls.tt
  83. sender_name: admin tls
  84.  
  85. nelmio_cors:
  86. defaults:
  87. allow_credentials: false
  88. allow_origin: []
  89. allow_headers: []
  90. allow_methods: []
  91. expose_headers: []
  92. max_age: 0
  93. hosts: []
  94. origin_regex: false
  95. forced_allow_origin_value: ~
  96.  
  97. # To get started with security, check out the documentation:
  98. # https://symfony.com/doc/current/security.html
  99. security:
  100. encoders:
  101. FOSUserBundleModelUserInterface: bcrypt
  102.  
  103. # https://symfony.com/doc/current/security.html#b-configuring-how-users-are-loaded
  104. providers:
  105. in_memory:
  106. memory: ~
  107. fos_userbundle:
  108. id: fos_user.user_provider.username
  109.  
  110. firewalls:
  111. # disables authentication for assets and the profiler, adapt it according to your needs
  112. dev:
  113. pattern: ^/(_(profiler|wdt)|css|images|js)/
  114. security: false
  115.  
  116. main:
  117. pattern: ^/
  118. form_login:
  119. provider: fos_userbundle
  120. csrf_token_generator: security.csrf.token_manager # Use form.csrf_provider instead for Symfony <2.4
  121. logout: true
  122. anonymous: true
  123. # activate different ways to authenticate
  124.  
  125. # https://symfony.com/doc/current/security.html#a-configuring-how-your-users-will-authenticate
  126. #http_basic: ~
  127.  
  128. # https://symfony.com/doc/current/security/form_login_setup.html
  129. #form_login: ~
  130. login:
  131. pattern: ^/login
  132. stateless: true
  133. anonymous: true
  134. provider: fos_userbundle
  135. form_login:
  136. check_path: /login_check
  137. success_handler: lexik_jwt_authentication.handler.authentication_success
  138. failure_handler: lexik_jwt_authentication.handler.authentication_failure
  139. require_previous_session: false
  140. api:
  141. pattern: ^/api
  142. stateless: true
  143. guard:
  144. authenticators:
  145. - lexik_jwt_authentication.jwt_token_authenticator
  146. access_control:
  147. - { path: ^/api/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
  148. - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
  149. - { path: ^/api, roles: IS_AUTHENTICATED_FULLY }
  150. - { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
  151. - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
  152. - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
  153. - { path: ^/admin/, role: ROLE_ADMIN }
  154.  
  155. # This file is auto-generated during the composer install
  156. parameters:
  157. database_host: 127.0.0.1
  158. database_port: null
  159. database_name: jwt
  160. database_user: root
  161. database_password: root
  162. mailer_transport: smtp
  163. mailer_host: 127.0.0.1
  164. mailer_user: null
  165. mailer_password: null
  166. secret: ea0a3bab6b4dc3bb4b9f8c54c5c7b6e5139ad444
  167.  
  168. jwt_private_key_path: '%kernel.root_dir%/../var/jwt/private.pem' # ssh private key path
  169. jwt_public_key_path: '%kernel.root_dir%/../var/jwt/public.pem' # ssh public key path
  170. jwt_key_pass_phrase: '' # ssh key pass phrase
  171. jwt_token_ttl: 3600
  172.  
  173. app:
  174. resource: '@AppBundle/Controller/'
  175. type: annotation
  176. api_login_check:
  177. path: /login_check
  178.  
  179. # app/config/routing.yml
  180. fos_user_security:
  181. resource: "@FOSUserBundle/Resources/config/routing/security.xml"
  182.  
  183. fos_user_profile:
  184. resource: "@FOSUserBundle/Resources/config/routing/profile.xml"
  185. prefix: /profile
  186.  
  187. fos_user_register:
  188. resource: "@FOSUserBundle/Resources/config/routing/registration.xml"
  189. prefix: /register
  190.  
  191. fos_user_resetting:
  192. resource: "@FOSUserBundle/Resources/config/routing/resetting.xml"
  193. prefix: /resetting
  194.  
  195. fos_user_change_password:
  196. resource: "@FOSUserBundle/Resources/config/routing/change_password.xml"
  197. prefix: /profile
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement