knpuniversity / oauth2-client-bundle

Easily talk to an OAuth2 server for social functionality in Symfony
https://symfonycasts.com
MIT License
786 stars 146 forks source link

why no client credentials Grant #251

Open mohamed-akef opened 4 years ago

mohamed-akef commented 4 years ago

I check KnpU\OAuth2ClientBundle\Client\OAuth2Client line 107 $this->provider->getAccessToken('authorization_code', array_merge(['code' => $code], $options));

There is no way to create token as a grant, but this feature is provided from the main package $accessToken = $provider->getAccessToken('client_credentials');

I will try to create new Clint for my use to provide this functionality if this working with you I will create PR here

weaverryan commented 4 years ago

Hi @mohamed-akef!

I had a similar conversation with someone about this recently: https://github.com/knpuniversity/oauth2-client-bundle/issues/247

The main purpose of this bundle is to help support the authorization_code flow. However, I would of course welcome any feature that might make the client_credentials functionality easier to use with the bundle :).

Cheers!

mohamed-akef commented 4 years ago

Hi @mohamed-akef!

I had a similar conversation with someone about this recently: #247

The main purpose of this bundle is to help support the authorization_code flow. However, I would of course welcome any feature that might make the client_credentials functionality easier to use with the bundle :).

Cheers!

Ok thanks, I created one but it needs some enhancement I will work on it and update you when it finishes