PHP-OAuth2 icon indicating copy to clipboard operation
PHP-OAuth2 copied to clipboard

Don't throw exception if access token is in JSON

Open tlshaheen opened this issue 10 years ago • 1 comments

If params are passed as JSON (instead of array), check and see if the access token is part of the JSON.

If it is, do not throw the "You need to give parameters as array if you want to give the token within the URI" exception.

For my example, the URL I pass to fetch() has ?access_token=X as part of the URL string. I am passing my $params as a JSON string that also includes access_token.

Without this change, I'm not sure how #6 was passing JSON $params and not having this error be thrown.

tlshaheen avatar Jul 09 '14 12:07 tlshaheen

@adoy ? Maybe not the best implementation, but the behavior change is wanted?

vendethiel avatar Jan 20 '16 21:01 vendethiel