OAuth1
OAuth1 copied to clipboard
Looking for some critique on my demo oauth client
Hello!
Thanks to some help from other users who are active in this repo, I have made some progress in understanding and implementing oauth. I've summarized this into a gist and I was wondering if I could get anyone to critique it. It's only about 200 lines, 2/3 of which are comments and whitespace.
It assumes:
- You already have your token and token_secret, perhaps from postman or such.
- You don't care about being able to revoke access.
- The creds will be used for scripted http requests to the server running the oauth plugin. Indeed, you'd create an admin on the oauth site explicitly for this purpose.
- You'd run it from within a WordPress plugin.
https://gist.github.com/scofennell/a078343d81b502328bc08f2b52dd8804
It seems to work really well, although I'm sure there are many edge cases I'm unaware of. Full disclosure, I am researching to both use this in production and write an article on the topic.