SHARE
TWEET

Untitled

a guest Sep 13th, 2017 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # config.yml
  2.  
  3. imports:
  4.     - { resource: parameters.ini }
  5.     - { resource: security.yml }
  6.  
  7. framework:
  8.     secret:         %secret%
  9.     charset:        UTF-8
  10.     exception_controller: 'FOS\RestBundle\Controller\ExceptionController::showAction'
  11.     router:         { resource: "%kernel.root_dir%/config/routing.yml" }
  12.     form:           true
  13.     csrf_protection: true
  14.     validation:     true
  15.     templating:     { engines: ['twig'] } #assets_version: SomeVersionScheme
  16.     session:
  17.         default_locale: %locale%
  18.         lifetime:      3600
  19.         auto_start:    true
  20.  
  21. # Twig Configuration
  22. twig:
  23.     debug:           %kernel.debug%
  24.     strict_variables: %kernel.debug%
  25.  
  26. # Doctrine Mongo DB Configuration
  27. doctrine_mongodb:
  28.     default_database: raid_%kernel.environment%
  29.     default_document_manager: default
  30.     connections:
  31.         default:
  32.             server: mongodb://localhost:27017
  33.             options:
  34.                 connect: true
  35.     document_managers:
  36.         default:
  37.             auto_mapping: true
  38.  
  39. # Swiftmailer Configuration
  40. swiftmailer:
  41.     transport: %mailer_transport%
  42.     host:     %mailer_host%
  43.     username: %mailer_user%
  44.     password: %mailer_password%
  45.    
  46. # SensioFrameworkExtraBundle Configuration
  47. sensio_framework_extra:
  48.     view:   { annotations: false }
  49.     router: { annotations: true }
  50.    
  51. # JMSSerializerBundle Configuration
  52. jms_serializer: ~
  53.    
  54. # FOSUserBundle Configuration
  55. fos_user:
  56.     db_driver: mongodb
  57.     firewall_name: main
  58.     class:
  59.         model:
  60.             user: Oblivion\RaidCommonBundle\Document\User
  61.     encoder:
  62.         algorithm: sha512
  63.         encode-as-base64: true
  64.         iterations: 8
  65.  
  66. # FOSRestBundle Configuration
  67. fos_rest:
  68.     normalizers:
  69.         Oblivion\RaidCommonBundle\Document\User: "oblivion_raid_api.normalizer.user"
  70.     default_normalizers:
  71.        - "fos_rest.get_set_method_normalizer"
  72.     routing_loader:
  73.        default_format: json
  74.     format_listener: true
  75.     body_listener: true
  76.     frameworkextra_bundle: true
  77.    
  78. # OblivionRaidApiBundle Configuration
  79. oblivion_raid_api:
  80.     use_normalizers: true
  81.  
  82. -----------------------------------
  83.  
  84. # security.yml
  85.  
  86. security:
  87.     encoders:
  88.         Symfony\Component\Security\Core\User\User: plaintext
  89.         Oblivion\RaidCommonBundle\Document\User:
  90.             algorithm: sha512
  91.             encode-as-base64: true
  92.             iterations: 8
  93.  
  94.     role_hierarchy:
  95.         ROLE_ADMIN:      ROLE_USER
  96.         ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
  97.  
  98.     providers:
  99.         in_memory:
  100.             users:
  101.                 user: { password: userpass, roles: [ 'ROLE_USER' ] }
  102.                 admin: { password: adminpass, roles: [ 'ROLE_ADMIN' ] }
  103.  
  104.     firewalls:
  105.         main:
  106.             pattern: .*
  107.             #form_login:
  108.             #    provider: fos_userbundle
  109.             #    login_path: /login
  110.             #    check_path: /login_check
  111.             #logout: true
  112.             anonymous: true
  113.  
  114.     access_control:
  115.         - { path: ^/_wdt/*, role: IS_AUTHENTICATED_ANONYMOUSLY }
  116.         - { path: ^/_profiler/*, role: IS_AUTHENTICATED_ANONYMOUSLY }
  117.         - { path: ^/.*, role: IS_AUTHENTICATED_ANONYMOUSLY }
RAW Paste Data
Top