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...
-
Secure for what purpose?– Jacob PeattieCommented May 27, 2021 at 15:16
-
Why not just check to see if the requester is logged in.– shanebpCommented May 27, 2021 at 15:31
-
The consumer for these APIs will be a Python desktop application without access to WordPress users accounts.– icolumbroCommented 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.– Jacob PeattieCommented May 27, 2021 at 18:30
Add a comment
|