Search code examples
springspring-securityspring-security-oauth2

How change generate token path in Spring Authorization Server


I would like to change url /oauth2/token?grant_type=client_credentials to /mytext/token?grant_type=client_credentials. Is this even possible?


Solution

  • If you want to change the endpoint for the client system then Yes, but in that case you've to create an api, mapping to address /mytext/token for the clients. Provide all the details from client-end that require for client_credentials grant type. Once your server received the request, you can use those details and invoke the endpoint /oauth2/token of the Authorization server.