Token introspection with Spring Authorization Server

To check if an access token is still valid, expired, revoked, or issued by our Authorization Server, we will use the token introspection endpoint of the Authorization Server to do this.

With Authorization Server implemented using Spring Authorization Server, you can use the token introspection endpoint as POST request http://localhost:8080/oauth2/introspect with request body containing “token” parameter with value is the access token we want to check, client_id and client_secret to authenticate the request.

Suppose now, you get the access token of a RegisteredClient declared in the Authorization Server:

then request the token introspection endpoint, you will see the following result:

4.5/5 - (2 votes)

One thought on “Token introspection with Spring Authorization Server

  1. Thanks it worked perfectly. if possible can you make an article on JdbcRegisteredClientRepository. i need it. thanks.

Add Comment