oauth2-php | standard compliant OAuth2.0 library | OAuth library
kandi X-RAY | oauth2-php Summary
kandi X-RAY | oauth2-php Summary
The standard compliant OAuth2.0 library based on the Symfony Components.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Register the service provider .
- Check the refresh token .
- Handle an access token .
- Check scope .
- Check redirect_uri .
- Handle exceptions .
- Authenticates the given token .
- Read models by criteria .
- Get a JSON response .
- Get the grant type handler .
oauth2-php Key Features
oauth2-php Examples and Code Snippets
Community Discussions
Trending Discussions on oauth2-php
QUESTION
With regards to OAuth 2.0, my previous understanding is that client_secret should be used for authorization_code grant, which is supposed to be "more secure" (client_secret was required for some tutorial out here 1 2)
However I saw a library when using authorization_code, didn't brother to check client_secret if not provided. Which makes me wonder the usage of client_secret and dig deeper into the spec of OAuth2.
I then looked into the RFC for OAuth 2 (https://tools.ietf.org/html/rfc6749#section-4.1), and found that client_secret is not required at all for authorization_code grant flow.
If you scroll down to the required param for authorization_code flow https://tools.ietf.org/html/rfc6749#section-4.1.1, you will see that client_secret is not even mentioned
So my question is:
- Is client_secret required for authorization_code grant type?
- If it is suggested to have client_secret instead of required, will there be any official documentation that tell us that client_secret is suggested?
Thanks!
...ANSWER
Answered 2018-Jul-31 at 17:58Good question and one of the things I find most annoying about OAuth2.0 - understanding the security protocol around public clients.
To answer your questions as best I can:-
Is client_secret required for authorization_code grant type?
No. If the client is a public client then it should be allowed to use this grant type without authenticating itself (providing it registers a redirection endpoint). The problem is that there seem to be several implementations of OAuth2.0 Servers that don't allow public clients for this grant type.
If it is suggested to have client_secret instead of required, will there be any official documentation that tell us that client_secret is suggested?
You probably need to look at the documentation of the actual OAuth2.0 provider you use, rather than the generic IETF specification as they may specify rules around public clients outside of the RFC.
The 6749 RFC pretty much just says that the the Auth Server SHOULD deal with the fact public clients are more insecure, without giving the exact details of how to.
e.g. Section 10.1 says:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install oauth2-php
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page