Replies: 0
Hi,
I’m having some problems using the header authentication.
If I get a JWT token in this way:
https://mysite/wp-json/jwt-auth/v1/token
I get the token: <my_jwt_token>
If I add this header calling a custom web service:
Authorization: Bearer <my_jwt_token>
The web service is defined in this way:
register_rest_route('em/v1', 'useredit', [
'methods' => 'PUT',
'callback' => 'wp_kns_useredit',
'permission_callback' => function($request){
return is_user_logged_in();
}
]);
If I use Http, it works:
http://mysite/wp-json/em/v1/useredit
But if I use Https, I have this error:
https://mysite/wp-json/em/v1/useredit
{
"code": "jwt_auth_bad_iss",
"message": "The iss do not match with this server",
"data": {
"status": 403
}
}
Which could be the problem?
I’m using WordPress 5.3.
-
This topic was modified 15 minutes ago by ioclaudio.