0

I'm writing a plugin that expose a custom resource via WordPress API's. Now the resource is public so anyone knows the API's endpoint can get the resource but I would to secure it, what's the best practice with WordPress? I was thinking to JWT but I don't want to use third party plugins, maybe is it possible to use a library found on packagist.org and installed with Composer? I never did it with a WordPress plugin...

4
  • Secure for what purpose? Commented May 27, 2021 at 15:16
  • Why not just check to see if the requester is logged in.
    – shanebp
    Commented May 27, 2021 at 15:31
  • The consumer for these APIs will be a Python desktop application without access to WordPress users accounts.
    – icolumbro
    Commented May 27, 2021 at 17:24
  • Have you read developer.wordpress.org/rest-api/using-the-rest-api/…? I don’t see why you’d want to avoid third party plugins but be ok with a third party library. Commented May 27, 2021 at 18:30

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.