I am currently coding an API in Laravel with Dingo and JWT as its authentication
It works fine, and I have set Dingo config to protected
, so a valid JWT token will always need to be there, otherwise it will fail with 401 error. Again it works fine.
The question is .. how can I customise the error message? At the moment it shows like this
{
message: "JWT has expired",
status_code: 401,
debug: { "..."
}
}
At minimum I want to get "JWT has expired" changed to a custom text, either from JWT or Dingo but of course if it can be customised further, it would be great.
Any advice? Thanks