Hi all,
I'm trying to upgrade the OAuthBundle that is not working for the
current sf2 version.
The Security Firewall doesn't recognise the options that I have set in
the security.yml config.
The error:
------------
InvalidConfigurationException: Unrecognized options "auth_provider,
client_id, client_secret, scope, login_path, check_path, failure_path"
under "security.firewalls.oauth"
The Firewall Listener Construct:
------------
class OAuthListener extends AbstractAuthenticationListener
{
private $oauthProvider;
private $httpUtils;
/**
* {@inheritdoc}
*/
public function __construct(SecurityContextInterface
$securityContext, AuthenticationManagerInterface
$authenticationManager,
SessionAuthenticationStrategyInterface $sessionStrategy,
HttpUtils $httpUtils, $providerKey,
array $options = array(),
AuthenticationSuccessHandlerInterface $successHandler = null,
AuthenticationFailureHandlerInterface $failureHandler = null,
LoggerInterface $logger = null,
EventDispatcherInterface $dispatcher = null, ProviderInterface
$oauthProvider)
{
parent::__construct($securityContext, $authenticationManager,
$sessionStrategy, $httpUtils, $providerKey,
array_merge( array(
'auth_provider' => 'google',
'client_id' => 'xxxx',
'client_secret' => 'xxxxxx',
'scope' => 'http://www.google.com/calendar/
feeds',
'login_path' => '/login',
'check_path' => '/auth',
'failure_path' => '/denied'
), $options), $successHandler, $failureHandler, $logger,
$dispatcher);
$this->oauthProvider = $oauthProvider;
$this->httpUtils = $httpUtils;
}
...
The config:
------------
firewalls:
logout: true
pattern: ^/
oauth:
auth_provider: google
client_id: comertial.com
client_secret: XLpa7FW2sXhKIRqdGSzmpMHI
scope: http://www.google.com/calendar/feeds
http://picasaweb.google.com/data
login_path: /login
check_path: /auth
failure_path: /
Thanks at all!
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en