I am trying to implement authorization server with spring security 5.1. But I have a problem.
I have implemented a custome token enhancer to add id_token in token response to match OIDC scope and it is working fine.
But the problem started when the service provider sent nonce parameter as part of authorization request and expecting it to be present in the id_token sent by authorization server. So my question is:
How to access the parameters sent in authorize request in "token_enhancer"?
What I have tried?
I have added a login success-handler and can get the saved authorize request. But I need the same when creating the token.
Any idea how to do that?
Thanks.