我已按照此spring-security-oauth-example创建了Oauth2服务器。如何从邮递员那里获得Oauth2令牌?
这是资源服务器的代码,这是 AuthorizationServerConfig.
我想了解如何从邮递员那里获取clientid =“ ClientId”的Oauth2令牌?以下这些代码表示什么:
public class AuthorizationServerConfig extends AuthorizationServerConfigurerAdapter {
@Autowired
private AuthenticationManager authenticationManager;
@Override
public void configure(AuthorizationServerSecurityConfigurer security) throws Exception {
security.tokenKeyAccess("permitAll()")
.checkTokenAccess("isAuthenticated()");
}
public class ResourceServerConfig extends WebSecurityConfigurerAdapter {
http.requestMatchers()
.antMatchers("/login", "/oauth/authorize") //what does this do
application.properties具有
server.port=8081
server.context-path=/auth security.basic.enable=false
答案 0 :(得分:1)
在邮递员中设置OAuth 2.0令牌的步骤。
打开邮递员。
创建一个新请求。点击authorization
标签。下面的屏幕截图:
因此,我正在添加一些有用的资源,以帮助您了解OAuth 2.0类型。
以上链接的屏幕截图:Oauth 2.0授权框架的外观。
一些视频讲座可以直观地了解它:
希望这对您有所帮助。
谢谢。 :)