Browse Source

Login proxy en base

root 7 years ago
parent
commit
1117eb9672
5 changed files with 29 additions and 16 deletions
  1. 14 2
      app/config/security.yml
  2. 1 1
      bin/symfony_requirements
  3. 11 11
      composer.lock
  4. 2 1
      src/FTTHBundle/Form/ONUType.php
  5. 1 1
      web/config.php

+ 14 - 2
app/config/security.yml

@@ -1,8 +1,11 @@
 security:
-    
     providers:
         oauth:
             id: base_oauth_bundle.oauth_user_provider
+        oauth_proxy_provider:
+            id: base_oauth_bundle.oauth_user_provider
+
+            #           base_oauthclient_security_oauthproxyprovider
     
     role_hierarchy:
         ROLE_ADMIN: [ROLE_USER, ROLE_ALLOWED_TO_SWITCH]
@@ -12,6 +15,14 @@ security:
         dev:
             pattern: ^/(_(profiler|wdt)|css|images|js)/
             security: false
+        api:
+          pattern: ^/api
+          stateless: true
+          simple_preauth:
+              authenticator: base_oauthclient_security_oauthproxyauthenticator
+          provider: oauth_proxy_provider
+
+            
         secured_area:
             pattern: ^/
             logout:
@@ -32,4 +43,5 @@ security:
                     
     access_control:
         - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
-        - { path: ^/admin/, role: ROLE_ADMIN }
+        - { path: ^/admin/, role: ROLE_ADMIN }
+        - { path: ^/api/,   role: ROLE_ADMIN}

+ 1 - 1
bin/symfony_requirements

@@ -1,7 +1,7 @@
 #!/usr/bin/env php
 <?php
 
-require_once dirname(__FILE__).'/../var/SymfonyRequirements.php';
+require_once dirname(__FILE__).'/./SymfonyRequirements.php';
 
 $lineSize = 70;
 $symfonyRequirements = new SymfonyRequirements();

+ 11 - 11
composer.lock

@@ -1412,7 +1412,7 @@
                 "bootstrap",
                 "sonata"
             ],
-            "time": "2017-08-11 17:26:08"
+            "time": "2017-08-11T17:26:08+00:00"
         },
         {
             "name": "ik/device-bundle",
@@ -1435,7 +1435,7 @@
                 "bundle",
                 "validators"
             ],
-            "time": "2017-08-15 13:45:08"
+            "time": "2017-08-15T13:45:08+00:00"
         },
         {
             "name": "ik/extra-data-bundle",
@@ -1458,7 +1458,7 @@
                 "bundle",
                 "extra-data"
             ],
-            "time": "2017-07-05 12:20:18"
+            "time": "2017-07-05T12:20:18+00:00"
         },
         {
             "name": "ik/migrations-bundle",
@@ -1481,7 +1481,7 @@
                 "bundle",
                 "migrations"
             ],
-            "time": "2017-08-01 12:51:23"
+            "time": "2017-08-01T12:51:23+00:00"
         },
         {
             "name": "ik/oauthclient-bundle",
@@ -1508,7 +1508,7 @@
                 "bundle",
                 "oauth"
             ],
-            "time": "2017-08-02 14:10:32"
+            "time": "2017-08-02T14:10:32+00:00"
         },
         {
             "name": "ik/owner-voter-bundle",
@@ -1531,7 +1531,7 @@
                 "bundle",
                 "owner-voter"
             ],
-            "time": "2017-06-12 15:49:24"
+            "time": "2017-06-12T15:49:24+00:00"
         },
         {
             "name": "ik/template-bundle",
@@ -1557,7 +1557,7 @@
                 "bundle",
                 "template"
             ],
-            "time": "2017-08-02 18:42:10"
+            "time": "2017-08-02T18:42:10+00:00"
         },
         {
             "name": "ik/webservice-bundle",
@@ -1578,7 +1578,7 @@
                 }
             },
             "description": "The Flowdat3 Webservice Rest",
-            "time": "2017-08-15 13:48:13"
+            "time": "2017-08-15T13:48:13+00:00"
         },
         {
             "name": "ik/workflow-bundle",
@@ -1616,7 +1616,7 @@
                 "bundle",
                 "workflow"
             ],
-            "time": "2017-08-04 14:29:28"
+            "time": "2017-08-04T14:29:28+00:00"
         },
         {
             "name": "incenteev/composer-parameter-handler",
@@ -2010,7 +2010,7 @@
                     "email": "stof@notk.org"
                 },
                 {
-                    "name": "Knplabs",
+                    "name": "KnpLabs",
                     "homepage": "http://knplabs.com"
                 },
                 {
@@ -5602,7 +5602,7 @@
                 }
             ],
             "description": "REST API Generator for Symfony 2",
-            "time": "2016-04-18 12:29:38"
+            "time": "2016-04-18T12:29:38+00:00"
         },
         {
             "name": "webmozart/assert",

+ 2 - 1
src/FTTHBundle/Form/ONUType.php

@@ -20,7 +20,8 @@ class ONUType extends AbstractType
                 ->add('clientId')
                 ->add('administrativeState')
                 ->add('currentState')
-                ->add('transitionState');
+                ->add('transitionState')
+                ->add('tenancyId');
     }
     
     /**

+ 1 - 1
web/config.php

@@ -22,7 +22,7 @@ if (!in_array(@$_SERVER['REMOTE_ADDR'], array(
     exit('This script is only accessible from localhost.');
 }
 
-require_once dirname(__FILE__).'/../var/SymfonyRequirements.php';
+require_once dirname(__FILE__).'/./SymfonyRequirements.php';
 
 $symfonyRequirements = new SymfonyRequirements();