Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi there! 👋
I had some time, so I went through the current code base (i.e., the
auth-code-flow
branch, which this PR thus targets), with an army of house elves, and fixed, updated and improved a few things here and there.Sorry for not splitting up commits. I did this on purpose, though, because otherwise we would've ended up with 42 (!) commits, ... or so.
I did not do any real changes to functionality, though, but see for yourself...
What Does This Pull Request Include?
WP\OAuth2\Client::check_redirect_uri()
returntrue
orfalse
.WP\OAuth2\Endpoints\Authorization::handle_request()
.int
.WP\OAuth2\Tokens\Token::is_valid()
abstract, and not static anymore.WP\OAuth2\Tokens\Token::get_meta_prefix()
method.$client
in the login template.What's Left?
admin.php
:lib/class-wp-rest-oauth1-admin.php
does not exist in this plugin.oauth1
all over.inc/class-scopes.php
:inc/endpoints/class-authorization.php
:handle_request()
method usesOAuth2\get_grant_types()
, which returns the unvalidated result of a filter,oauth2.grant_types
.OAuth2\get_grant_types()
function should both validate the data (and remove invalid handlers) and stateWP\OAuth2\Types\Type[]
instead ofarray
as return type.inc/tokens/class-authorization-code.php
:$args
parameter inWP\OAuth2\Tokens\Authorization_Code::validate()
is for inheritance...?Again, this PR targets the
auth-code-flow
branch. If you want me to make it targetmaster
instead, just tell me.Cheers,
Thorsten