Timeline for WP rest api endpoint protection using jwt token
Current License: CC BY-SA 4.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 28 at 17:43 | answer | added | Konstantin Karavaev | timeline score: 0 | |
Aug 22, 2022 at 9:50 | vote | accept | mike | ||
Aug 18, 2022 at 10:11 | answer | added | mike | timeline score: 2 | |
Aug 17, 2022 at 11:48 | comment | added | Tom J Nowell♦ | you don't, that's not how you implement custom authentication in the REST API, have you looked at wordpress.org/plugins/jwt-authentication-for-wp-rest-api ? Or are you already using that plugin? If so you need to share that information. You are meant to authenticate before a callback is handled, not inside it. There is no information here on how you implemented JWT | |
Aug 17, 2022 at 9:17 | comment | added | mike | Yes how to check the jwt token is valid or not in update_payment_history function inside | |
Aug 16, 2022 at 15:04 | comment | added | Tom J Nowell♦ |
are you asking how to check for JWT tokens in update_payment_history ? If so, the answer is you do not, that's the function that handles the endpoint if the user has permission, JWT and authentication happens elsewhere. Have you checked the REST API handbooks section on authentication?
|
|
Aug 16, 2022 at 15:03 | history | edited | Tom J Nowell♦ | CC BY-SA 4.0 |
added 3 characters in body
|
Aug 16, 2022 at 15:02 | comment | added | Tom J Nowell♦ | there's already JWT authentication plugins, it would be much safer to use one of those rather than rolling your own security. Also JWT has questionable safety that requires going above and beyond to secure | |
Aug 16, 2022 at 14:10 | history | edited | mike | CC BY-SA 4.0 |
deleted 9 characters in body
|
S Aug 16, 2022 at 14:06 | review | First questions | |||
Aug 17, 2022 at 20:28 | |||||
S Aug 16, 2022 at 14:06 | history | asked | mike | CC BY-SA 4.0 |