注册的应用有点乱,能否进一步解释一下
来源:4-4 OAuth2协议与微服务安全
郭玉成
2019-10-19
clients.inMemory()
.withClient(“orderApp”)
.secret(passwordEncoder.encode(“123456”))
.scopes(“read”, “write”)
.accessTokenValiditySeconds(3600)
.resourceIds(“order-server”)
.authorizedGrantTypes(“password”)
.and()
.withClient(“orderService”)
.secret(passwordEncoder.encode(“123456”))
.scopes(“read”)
.accessTokenValiditySeconds(3600)
.resourceIds(“order-server”)
.authorizedGrantTypes(“password”);
1.以上代码中,orderService与order-server在以上代码里表示不同的应用吗?为什么?
2.如果是同一个应用,orderService与order-server为什么不写成相同的?
1回答
-
郭玉成
提问者
2019-10-19
经过测试,以下加注释的部分均不需要
clients.inMemory()
.withClient(“orderApp”)
.secret(passwordEncoder.encode(“123456”))
.scopes(“read”, “write”)
.accessTokenValiditySeconds(3600)
.resourceIds(“order-server”)
.authorizedGrantTypes(“password”)
.and()
.withClient(“orderService”)
.secret(passwordEncoder.encode(“123456”))
//.scopes(“read”)
//.accessTokenValiditySeconds(3600)
//.resourceIds(“order-server”)
//.authorizedGrantTypes(“password”)
;00
相似问题
回答 3
回答 1