Browse Source

refactory oauth

Guillermo Espinoza 8 years ago
parent
commit
924b5528d6

+ 1 - 1
app/AppKernel.php

@@ -29,7 +29,7 @@ class AppKernel extends Kernel
             new Base\AdminBundle\BaseAdminBundle(),
             new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
             new HWI\Bundle\OAuthBundle\HWIOAuthBundle(),
-            new Base\OAuthBundle\BaseOAuthBundle()
+            new Base\OAuthClientBundle\BaseOAuthClientBundle()
         ];
 
         if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {

+ 3 - 4
app/config/config.yml

@@ -8,9 +8,8 @@ imports:
     - { resource: "@WebserviceBundle/Resources/config/services.yml" }
     - { resource: workflow.yml }
     - { resource: "hwioauthbundle/parameters.yml" }
-    - { resource: "@BaseOAuthBundle/Resources/config/services.yml" }
-    - { resource: "@BaseOAuthBundle/Resources/config/hwioauthbundle/services.yml" }
-    - { resource: "@BaseOAuthBundle/Resources/config/hwioauthbundle/config.yml" }
+    - { resource: "@BaseOAuthClientBundle/Resources/config/hwioauthbundle/services.yml" }
+    - { resource: "@BaseOAuthClientBundle/Resources/config/hwioauthbundle/config.yml" }
 
 parameters:
     locale: es
@@ -87,4 +86,4 @@ sonata_block:
 sonata_admin:
     templates:
         layout: BaseAdminBundle::standard_layout.html.twig
-        user_block: BaseOAuthBundle:Core:oauth_user_block.html.twig
+        user_block: BaseOAuthClientBundle:Core:oauth_user_block.html.twig

+ 2 - 2
app/config/hwioauthbundle/parameters.yml.dist

@@ -1,6 +1,6 @@
 parameters:
-    client_id:           "5_4pweqwos4jy8wokw0cssks04gg4k04o0ccgcskc0ow0skg88s0"
-    client_secret:       "26gqveoflockc88w88gsc0o0kow404wo8ww8s4gkk08c0c44g0"
+    client_id:           "1_4201udjx8vsw0go8g84wsksg4o8ogoow0sosc8k44c8cscwssw"
+    client_secret:       "42ymihqa8js408ggk4c0cccswcw8okcogww80co8cogsgc4woo"
     access_token_url:    "http://127.0.0.1/base/app_dev.php/oauth/v2/token"
     authorization_url:   "http://127.0.0.1/base/app_dev.php/oauth/v2/auth"
     infos_url:           "http://127.0.0.1/base/app_dev.php/api/user/me"

+ 4 - 4
app/config/routing.yml

@@ -35,8 +35,8 @@ FTTHBundle:
     resource: "@FTTHBundle/Resources/config/routing/admin.xml"
     prefix: /admin    
     
-base_oauth:
-    resource: "@BaseOAuthBundle/Resources/config/routing.yml"
+base_oauth_client:
+    resource: "@BaseOAuthClientBundle/Resources/config/routing.yml"
     
-base_hwioauthbundle_oauth:
-    resource: "@BaseOAuthBundle/Resources/config/hwioauthbundle/routing.yml"
+base_hwioauthbundle_oauth_client:
+    resource: "@BaseOAuthClientBundle/Resources/config/hwioauthbundle/routing.yml"

+ 3 - 3
composer.json

@@ -33,7 +33,7 @@
         },
         {
             "type": "vcs",
-            "url":  "ssh://git@200.50.168.30:222/VendorSoftwareFlowdat3/BaseOAuthBundle.git",
+            "url":  "ssh://git@200.50.168.30:222/VendorSoftwareFlowdat3/BaseOAuthClientBundle.git",
             "options": {
                     "local_pk": "./keys/bitbucket.id_rsa"
             }
@@ -52,7 +52,7 @@
         "symfony/monolog-bundle": "^3.0.2",
         "symfony/polyfill-apcu": "^1.0",
         "sensio/distribution-bundle": "^5.0",
-        "sensio/framework-extra-bundle": "^3.0.2",
+        "sensio/framework-extra-bundle": "3.0.23",
         "incenteev/composer-parameter-handler": "^2.0",
         "sonata-project/admin-bundle": "^3.12",
         "sonata-project/doctrine-orm-admin-bundle": "^3.1",
@@ -61,7 +61,7 @@
         "stof/doctrine-extensions-bundle": "^1.2",
         "voryx/restgeneratorbundle": "dev-master",
         "base-admin": "dev-master",
-        "base-oauth-bundle": "dev-master",
+        "base-oauth-client-bundle": "dev-master",
         "webservice": "dev-master",
         "hwi/oauth-bundle": "^0.5.3"
     },

+ 14 - 141
composer.lock

@@ -4,8 +4,8 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
         "This file is @generated automatically"
     ],
-    "hash": "e1a72b6198aadc865febdc12465b5f54",
-    "content-hash": "77c5ac48977c4e8d01925f4d489838bc",
+    "hash": "559d3cd100bd916e9b1ec9fb137badb0",
+    "content-hash": "5193c192d6095ba0f9dc8b5d04010a81",
     "packages": [
         {
             "name": "base-admin",
@@ -31,31 +31,30 @@
             "time": "2017-03-08 18:28:07"
         },
         {
-            "name": "base-oauth-bundle",
+            "name": "base-oauth-client-bundle",
             "version": "dev-master",
             "source": {
                 "type": "git",
-                "url": "ssh://git@200.50.168.30:222/VendorSoftwareFlowdat3/BaseOAuthBundle.git",
-                "reference": "de4b4ffe43d02c539cba96c8585ccb2e8147706b"
+                "url": "ssh://git@200.50.168.30:222/VendorSoftwareFlowdat3/BaseOAuthClientBundle.git",
+                "reference": "6ece7b08e63a064873ffa5a70b260196c2cf60dd"
             },
             "require": {
-                "friendsofsymfony/oauth-server-bundle": "^1.5",
                 "hwi/oauth-bundle": "^0.5.3"
             },
             "type": "library",
             "autoload": {
                 "psr-4": {
-                    "Base\\OAuthBundle\\": ""
+                    "Base\\OAuthClientBundle\\": ""
                 }
             },
-            "description": "Flowdat 3 Base OAuth Bundle",
+            "description": "Flowdat 3 Base OAuth Client Bundle",
             "keywords": [
                 "Admin Generator",
                 "admin",
                 "bundle",
                 "oauth"
             ],
-            "time": "2017-03-21 13:28:40"
+            "time": "2017-03-22 14:10:27"
         },
         {
             "name": "behat/transliterator",
@@ -930,132 +929,6 @@
             ],
             "time": "2016-12-18 15:42:34"
         },
-        {
-            "name": "friendsofsymfony/oauth-server-bundle",
-            "version": "1.5.2",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/FriendsOfSymfony/FOSOAuthServerBundle.git",
-                "reference": "0b25cdaae8983c630bb62d14b6993219b1dadb8d"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/zipball/0b25cdaae8983c630bb62d14b6993219b1dadb8d",
-                "reference": "0b25cdaae8983c630bb62d14b6993219b1dadb8d",
-                "shasum": ""
-            },
-            "require": {
-                "friendsofsymfony/oauth2-php": "~1.1",
-                "php": "^5.3.3|^7.0",
-                "symfony/framework-bundle": "~2.2|~3.0",
-                "symfony/security-bundle": "~2.1|~3.0"
-            },
-            "require-dev": {
-                "doctrine/doctrine-bundle": "~1.0",
-                "doctrine/mongodb-odm": "~1.0",
-                "doctrine/orm": "~2.2",
-                "phing/phing": "~2.4",
-                "propel/propel1": "^1.6.5",
-                "symfony/class-loader": "~2.1|~3.0",
-                "symfony/form": "~2.3|~3.0",
-                "symfony/yaml": "~2.1|~3.0",
-                "willdurand/propel-typehintable-behavior": "^1.0.4"
-            },
-            "suggest": {
-                "doctrine/doctrine-bundle": "*",
-                "doctrine/mongodb-odm-bundle": "*",
-                "propel/propel-bundle": "If you want to use Propel with Symfony2, then you will have to install the PropelBundle",
-                "symfony/form": "Needed to be able to use the AuthorizeFormType",
-                "willdurand/propel-typehintable-behavior": "The Typehintable behavior is useful to add type hints on generated methods, to be compliant with interfaces"
-            },
-            "type": "symfony-bundle",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "1.5-dev"
-                }
-            },
-            "autoload": {
-                "psr-4": {
-                    "FOS\\OAuthServerBundle\\": ""
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Arnaud Le Blanc",
-                    "email": "arnaud.lb@gmail.com"
-                },
-                {
-                    "name": "FriendsOfSymfony Community",
-                    "homepage": "https://github.com/FriendsOfSymfony/FOSOAuthServerBundle/contributors"
-                }
-            ],
-            "description": "Symfony2 OAuth Server Bundle",
-            "homepage": "http://friendsofsymfony.github.com",
-            "keywords": [
-                "oauth",
-                "oauth2",
-                "server"
-            ],
-            "time": "2016-02-22 13:57:55"
-        },
-        {
-            "name": "friendsofsymfony/oauth2-php",
-            "version": "1.2.1",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/FriendsOfSymfony/oauth2-php.git",
-                "reference": "fa2aecb1fca2a03fd5f9aca19fe9adb9dfff928c"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/FriendsOfSymfony/oauth2-php/zipball/fa2aecb1fca2a03fd5f9aca19fe9adb9dfff928c",
-                "reference": "fa2aecb1fca2a03fd5f9aca19fe9adb9dfff928c",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=5.3.2",
-                "symfony/http-foundation": "~2.0|~3.0"
-            },
-            "require-dev": {
-                "phpunit/phpunit": "~4.0"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "1.2.x-dev"
-                }
-            },
-            "autoload": {
-                "psr-4": {
-                    "OAuth2\\": "lib/"
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Arnaud Le Blanc",
-                    "email": "arnaud.lb@gmail.com"
-                },
-                {
-                    "name": "FriendsOfSymfony Community",
-                    "homepage": "https://github.com/FriendsOfSymfony/oauth2-php/contributors"
-                }
-            ],
-            "description": "OAuth2 library",
-            "homepage": "https://github.com/FriendsOfSymfony/oauth2-php",
-            "keywords": [
-                "oauth",
-                "oauth2"
-            ],
-            "time": "2016-03-31 14:24:17"
-        },
         {
             "name": "friendsofsymfony/rest-bundle",
             "version": "1.7.7",
@@ -4661,16 +4534,16 @@
         },
         {
             "name": "symfony/swiftmailer-bundle",
-            "version": "v2.5.3",
+            "version": "v2.5.4",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/swiftmailer-bundle.git",
-                "reference": "b59a70d03b948e29d070b6c4416b4a03af4748ec"
+                "reference": "8ab32ce31a7156621fb92e0466586186beb89759"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/swiftmailer-bundle/zipball/b59a70d03b948e29d070b6c4416b4a03af4748ec",
-                "reference": "b59a70d03b948e29d070b6c4416b4a03af4748ec",
+                "url": "https://api.github.com/repos/symfony/swiftmailer-bundle/zipball/8ab32ce31a7156621fb92e0466586186beb89759",
+                "reference": "8ab32ce31a7156621fb92e0466586186beb89759",
                 "shasum": ""
             },
             "require": {
@@ -4716,7 +4589,7 @@
             ],
             "description": "Symfony SwiftmailerBundle",
             "homepage": "http://symfony.com",
-            "time": "2017-03-02 16:47:57"
+            "time": "2017-03-21 21:47:36"
         },
         {
             "name": "symfony/symfony",
@@ -5252,7 +5125,7 @@
     "stability-flags": {
         "voryx/restgeneratorbundle": 20,
         "base-admin": 20,
-        "base-oauth-bundle": 20,
+        "base-oauth-client-bundle": 20,
         "webservice": 20
     },
     "prefer-stable": false,

+ 0 - 0
var/sessions/.gitkeep