使用Auth0与Spring Cloud Config Server管理微服务安全与配置
一、使用Auth0更新服务与测试脚本
- 重建服务
首先,我们需要重建产品组合和网关服务,使用以下命令:
cd $BOOK_HOME/Chapter11
./gradlew build && docker-compose up -d --build product-composite gateway
- 更新测试脚本以从Auth0获取访问令牌
在test-em-all.bash脚本中进行如下更改:- 找到原有的获取访问令牌的命令:
ACCESS_TOKEN=$(curl -k https://writer:secret-writer@$HOST:$PORT/oauth2/token -d grant_type=client_credentials -d scope="product:read product:write" -s | jq .access_token -r)
- 替换为新的命令:
export TENANT=..
超级会员免费看
订阅专栏 解锁全文
5万+

被折叠的 条评论
为什么被折叠?



