nullfox
nullfox

Reputation: 607

PHP OAuthProvider Invalid Signature when passing additional $_GET params

I am creating an OAuth provider and it currently works, except when I pass additional $_GET parameters for filters, etc - I am using the Authorization header approach.

When I pass a URL like /me/actions it works - however, if I pass a URL like /me/actions?status=pending it breaks saying invalid signature.

I guess part of my problem is that I don't understand all of what params I should expect the OAuthProvider library to parse. Is it trying to parse additional $_GET params or simply ignoring them? Since it works without hte $_GET params is there a likely culprit?

Upvotes: 0

Views: 277

Answers (1)

Joaquín Gatica
Joaquín Gatica

Reputation: 56

Hope its not to late. Are you using PECL's OAuth & OAuthProvider classes? If so, check this method.

Using, on the server, the following:

$provider->setParam("status", NULL); //$provider = your instance of OAuthProvider

you're telling the provider to ignore those parameters when validating the signature. Do this for each parameter you send.

Hope it helps!

Upvotes: 1

Related Questions