Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Injecting parameters into OAuth services #32

Open
oniric85 opened this issue Jul 20, 2016 · 0 comments
Open

Injecting parameters into OAuth services #32

oniric85 opened this issue Jul 20, 2016 · 0 comments

Comments

@oniric85
Copy link

Hi,
I'm trying to inject some parameters through setters into the OAuth services. The base library you are using has some services which have setter methods to configure specific options. For example:

https://github.com/Lusitanian/PHPoAuthLib/blob/29bda6e176df6c292a9b1c43ae8a44d56a87c30b/src/OAuth/OAuth2/Service/Strava.php#L131

I've built a custom OAuth service and now I would like to do a similar thing using silex-oauth but I can't access services directly because they are stored in the ServiceRegistry and if I try to get a service from there with a getService call I get an exception:

RouteNotFoundException in UrlGenerator.php line 134: Unable to generate a URL for the named route "_auth_service_callback" as such route does not exist.

I guess that's because the route is created when the OAuthAuthenticationListener is created too while I'm trying to access the OAuth Service from another ServiceProvider I'm writing.

Is there a way provided by the library to achieve what I'm trying?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant