In my Java application, I use the Spring Security OAuth 2 library to implement the OAuth provider. The response to successful authentication (for grant type authorization_code) looks something like this:
{"access_token": "d179bf70-aa40-4df9-a3e1-440e835c273a", "expires_in": "43199", "refresh_token": "879e7bd0-5e0f-48a9-b64d-f61d5665bf4e", "scope": "read", "token_type": "bearer"}
Is there a way to add additional properties to this answer, for example. username or email?
Spring OAuth2 OAuth2AccessToken additionalInfo. , , AccessTokenConverter (, , DefaultTokenServices ). , , , ( , ).
OAuth2AccessToken
additionalInfo
AccessTokenConverter
DefaultTokenServices
Source: https://habr.com/ru/post/1584510/More articles:Memory leak in Mongoose Node.js - node.jsCounteract reboot bootstrap / select2? - javascriptHow to write a simple "page error generator"? - cLaravel 5 Validation: A Unique Rule for Examining Emails - validationTracking up HTML in AngularJS - jsonhow to use the environment variable in the client and server at the very beginning - meteorPython Anaconda: how to check if updated libraries are compatible with my existing code? - pythonКак я могу переставить массив, чтобы получить минимальный, средний и максимальный быстрее? - c++Removing list deserialization : frame; nonerame;"> > - json.NET не может десериализовать вложенные структуры? - c#All Articles