spring security 5.1 oauth 2, how to add additional parameters to user authentication uri

柔情痞子 提交于 2020-08-23 07:07:44

问题


I'm trying to integrate external oauth 2 authentication server and resource server. Their configuration requires some additional custom parameters: state - should be uuid, TimeStamp, accessType, also clientSecret should be signed using a combination of all previous params as data.

We are using Spring boot, spring security 5.1, Camunda.

The catch is I can't directly add params to URI calling method setUserAuthorizationUri cause this method is called only once during initialization


回答1:


The OAuth2AuthorizationRequestResolver provides the ability to customize the Authorization Request with additional parameters above the standard parameters and/or removing/changing one of the standard parameters. See the reference doc on OAuth2AuthorizationRequestResolver for implementation details.



来源:https://stackoverflow.com/questions/52890748/spring-security-5-1-oauth-2-how-to-add-additional-parameters-to-user-authentica

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!