There is no specific token check endpoint to validate a token. But you can use user info endpoint to validate your JWT token.

Send a get request to /realms/{realm-name}/protocol/openid-connect/userinfo endpoint with authorization bearer token in the header.

if a valid token it will give user info,

{
"sub": "xxx-xxx-xxx-xxx-xxx",
"name": "John Doe",
"preferred_username": "jdoe",
"given_name": "John",
"family_name": "Doe",
"email": "john.doe@example.com"
}

if token is not valid it will give

{
"error": "invalid_token",
"error_description": "Token invalid: Token is not active"
}
Chamith Madusanka
Chamith Madusanka

Written by Chamith Madusanka

Full Stack Enthusiast | JavaScript | TypeScript | ReactJs | NextJs | | NodeJs | NestJs | Serverless | Find me on Linkedin https://www.linkedin.com/in/chamith24/

No responses yet