forked from elchris/FOSOAuthServerBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Started to work on FOSOAuthServerBundle
- Loading branch information
1 parent
5b54858
commit efc8129
Showing
55 changed files
with
355 additions
and
285 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
Tests/autoload.php | ||
vendor/bundles/Alb/OAuth2ServerBundle | ||
vendor/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,15 @@ | ||
<?php | ||
|
||
namespace Alb\OAuth2ServerBundle\DependencyInjection\Security\Factory; | ||
/* | ||
* This file is part of the FOSOAuthServerBundle package. | ||
* | ||
* (c) FriendsOfSymfony <http://friendsofsymfony.github.com/> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace FOS\OAuthServerBundle\DependencyInjection\Security\Factory; | ||
|
||
use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\SecurityFactoryInterface; | ||
use Symfony\Component\Config\Definition\Builder\NodeDefinition; | ||
|
@@ -9,29 +18,27 @@ | |
use Symfony\Component\DependencyInjection\Reference; | ||
|
||
/** | ||
* OAuth2Factory class. | ||
* OAuthFactory class. | ||
* | ||
* @package AlbOAuth2ServerBundle | ||
* @subpackage DependencyInjection | ||
* @author Arnaud Le Blanc <[email protected]> | ||
*/ | ||
class OAuth2Factory implements SecurityFactoryInterface | ||
class OAuthFactory implements SecurityFactoryInterface | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function create(ContainerBuilder $container, $id, $config, $userProvider, $defaultEntryPoint) | ||
{ | ||
$providerId = 'security.authentication.provider.alb_oauth2_server.'.$id; | ||
$providerId = 'security.authentication.provider.fos_oauth_server.'.$id; | ||
$container | ||
->setDefinition($providerId, new DefinitionDecorator('alb.oauth2.server.security.authentication.provider')) | ||
->setDefinition($providerId, new DefinitionDecorator('fos.oauth_server.security.authentication.provider')) | ||
->replaceArgument(0, new Reference($userProvider)) | ||
; | ||
|
||
$listenerId = 'security.authentication.listener.alb_oauth2_server.'.$id; | ||
$listener = $container->setDefinition($listenerId, new DefinitionDecorator('alb.oauth2.server.security.authentication.listener')); | ||
$listenerId = 'security.authentication.listener.fos_oauth_server.'.$id; | ||
$listener = $container->setDefinition($listenerId, new DefinitionDecorator('fos.oauth_server.security.authentication.listener')); | ||
|
||
return array($providerId, $listenerId, 'alb.oauth2.server.security.entry_point'); | ||
return array($providerId, $listenerId, 'fos.oauth_server.security.entry_point'); | ||
} | ||
|
||
/** | ||
|
@@ -47,7 +54,7 @@ public function getPosition() | |
*/ | ||
public function getKey() | ||
{ | ||
return 'alb_oauth2'; | ||
return 'fos_oauth'; | ||
} | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,9 +3,9 @@ | |
* | ||
*/ | ||
|
||
namespace Alb\OAuth2ServerBundle\Document; | ||
namespace FOS\OAuthServerBundle\Document; | ||
|
||
use Alb\OAuth2ServerBundle\Model\OAuth2AuthCode as BaseOAuth2AuthCode; | ||
use FOS\OAuthServerBundle\Model\OAuth2AuthCode as BaseOAuth2AuthCode; | ||
|
||
/** | ||
* @author Richard Fullmer <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,9 +3,9 @@ | |
* | ||
*/ | ||
|
||
namespace Alb\OAuth2ServerBundle\Entity; | ||
namespace FOS\OAuthServerBundle\Entity; | ||
|
||
use Alb\OAuth2ServerBundle\Model\OAuth2AuthCode as BaseOAuth2AuthCode; | ||
use FOS\OAuthServerBundle\Model\OAuth2AuthCode as BaseOAuth2AuthCode; | ||
|
||
/** | ||
* @author Richard Fullmer <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.