如何更改 ClientCredentialsResourceDetails 发出的请求的内容类型?
How to change the content-type of a request which will be made by ClientCredentialsResourceDetails?
现在,我正在尝试更改将由 ClientCredentialsResourceDetails 提出的请求的 content-type
(org.springframework.security.oauth2.client.token.grant.client.ClientCredentialsResourceDetails
)
预期内容类型:- 即 form/data 或 multipart/form-data
但现在我只能see/do这一个,
ClientCredentialsResourceDetails resourceDetails = new ClientCredentialsResourceDetails();
resourceDetails.setClientAuthenticationScheme(AuthenticationScheme.header);
此代码只允许我通过以下 content-type
,
传递数据
content-type : application/x-www-form-urlencoded
所以,我想改变它。
任何人都可以给我一个想法吗?怎么做?
任何帮助感谢...!!!
客户端凭据流在 RFC 6749 中定义,“4.4. Client Credentials Grant", and "4.4.2. Access Token Request”如下所述。
The client makes a request to the token endpoint by adding the following parameters using the "application/x-www-form-urlencoded" format per Appendix B with a character encoding of UTF-8 in the HTTP request entity-body:
因此,期望 Spring 安全和其他 OAuth 客户端库提供将使用客户端凭据流的令牌请求 Content-Type 更改为“[=16] 以外的任何其他值的方法是没有希望的=]".
现在,我正在尝试更改将由 ClientCredentialsResourceDetails 提出的请求的 content-type
(org.springframework.security.oauth2.client.token.grant.client.ClientCredentialsResourceDetails
)
预期内容类型:- 即 form/data 或 multipart/form-data
但现在我只能see/do这一个,
ClientCredentialsResourceDetails resourceDetails = new ClientCredentialsResourceDetails();
resourceDetails.setClientAuthenticationScheme(AuthenticationScheme.header);
此代码只允许我通过以下 content-type
,
content-type : application/x-www-form-urlencoded
所以,我想改变它。
任何人都可以给我一个想法吗?怎么做?
任何帮助感谢...!!!
客户端凭据流在 RFC 6749 中定义,“4.4. Client Credentials Grant", and "4.4.2. Access Token Request”如下所述。
The client makes a request to the token endpoint by adding the following parameters using the "application/x-www-form-urlencoded" format per Appendix B with a character encoding of UTF-8 in the HTTP request entity-body:
因此,期望 Spring 安全和其他 OAuth 客户端库提供将使用客户端凭据流的令牌请求 Content-Type 更改为“[=16] 以外的任何其他值的方法是没有希望的=]".