I have a default Spring authorization Server implementation. i want to modify it as per my project requirements. I want to implement customized introspection endpoint in new spring authorization server. I will be having different kinds of tokens, based on token type I want to validate them differently. So I found out by default spring authorization server uses 'OAuth2TokenIntrospectionEndpointFilter', is there a way to use this class or we have to write a new class and add it to server configuration? Thank you.
I tried doing the following.
authorizationServerConfigurer.tokenIntrospectionEndpoint(
t -> t.authenticationProvider(customTokenAuthProvider)
.introspectionResponseHandler(successHandler));
I want to know if this the right way to do or any other method exists.