I'm using spring-security-oauth2-2.2.0 in a spring mvc application. I have my oauth2 token configured with OAuth2RestTemplate like this:
ClientCredentialsResourceDetails resourceDetails = new ClientCredentialsResourceDetails();
resourceDetails.setClientId("clientid");
resourceDetails.setClientSecret("secret");
resourceDetails.setGrantType("grant-type");
resourceDetails.setScope("scope");
resourceDetails.setAccessTokenUri("myurlé);
resourceDetails.setClientAuthenticationScheme(AuthenticationScheme.form);
resourceDetails.setAuthenticationScheme(AuthenticationScheme.header);
Now I want to add a new parameter within the old configuration and send it to authentication provider. The new parameter is called resource. Here is the postman configuration that works perfectly:
How can I integrate the new parameter to the old token configuration? Which method should I customize?