• Nomi

    (@naumanahmed19)


    Hi,

    Can you please add an example for custom rest endpoints? How to validate them

    I have enabled (All WordPress endpoints checks for JWT authentication) option in WordPress admin but still unable to get if the user logged in or not.

    and also added jwt in Authorization header

    • This topic was modified 3 years, 11 months ago by Nomi.
Viewing 1 replies (of 1 total)
  • Thread Starter Nomi

    (@naumanahmed19)

    ok, I found the issue. for my rest API, I wanted to have the same namespace for every route but it seems not possible if you have the following condition in the plugin. I think it would be great if you check plugin-related routes first and then allow any other routes. or maybe also have a feature in the plugin to add a specific route or hook to add custom routes.

    
    			if( strpos($currentURL, $jwtSettings->getRouteNamespace()) !== false){
    				//Skip middleware for simple-jwt-plugin
    				return $endpoint;
    			}
    
    
Viewing 1 replies (of 1 total)
  • The topic ‘Custom Rest End Points’ is closed to new replies.