【问题标题】:What is difference between AuthenticationScheme and ClientAuthenticationScheme in Spring oAuth2?Spring oAuth2 中的 AuthenticationScheme 和 ClientAuthenticationScheme 有什么区别?
【发布时间】:2019-03-06 18:44:07
【问题描述】:
我们在春季 oauth2 中有 setClientAuthenticationScheme() 和 setAuthenticationScheme()。
我了解ClientAuthenticationScheme 将找到clientID 和secret。但是setAuthenticationScheme() 是做什么的 - 是针对其他请求参数吗?
【问题讨论】:
标签:
java
oauth
oauth-2.0
spring-security-oauth2
【解决方案1】:
我想我找到了。setAuthenticationScheme() 是在资源调用中定位Bearer 标记
【解决方案2】:
下面的课程清楚地说明了身份验证方案的含义
public enum AuthenticationScheme {
/**
* Send an Authorization header.
*/
header,
/**
* Send a query parameter in the URI.
*/
query,
/**
* Send in the form body.
*/
form,
/**
* Do not send at all.
*/
none
}
枚举传输身份验证凭据的可能方法。