-4

I'm developing my first Python plugin for a 3D application.

What I'm looking to do

I would like users who've purchased a subscription to the plugin from my Wordpress/WooCommerce web site to log in to the plugin with the user name and password from my web site. The plugin would then send a REST request to see if the user's subscription is valid. I have a few questions about how this is done if anyone with experience can advise:

  1. It seems like I would need to store an OAuth's Consumer key & secret with Read-only privilege on the client's computer for requesting a REST response. The main plugin file will be encrypted. Should I store it there or should I consider another method?
  2. I'd imagine I'd need to either require an internet connection for the plugin to work or create a token somehow that stopped usage if the user cancelled their subscription. The WooCommerce REST result is JSON. How would I generate such a token?

Any guidance would be so helpful. Thank you!

  • Why was this downvoted? I apologize if I've committed an offense to this community; this is my first post. – DrPontchartrain Apr 14 at 0:23
-1

Short answer. Either use a bearer token or the clien need to have cookie session. First authenticate and get the authication cookie back and send it for every request.

| improve this answer | |
  • Thank you @SmallDev. I will look into this. – DrPontchartrain Apr 14 at 0:21
  • Looks like there is a lot of ppl like to down wote everything they can se here. This is pitty because it makes the whole page kind of crappy. Down voting doesnt really have any value unless they can describe why. – SmallDev Apr 15 at 3:21
  • I agree. It's especially discouraging to beginners. – DrPontchartrain Apr 16 at 16:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.