【发布时间】:2018-09-07 02:25:55
【问题描述】:
有一个外部 URI 用于捕获带有 post 请求的令牌。在其正文中包含uaa-url, client ID, secret。我怎样才能获得令牌?其相关的 URI 类似于{{https:// token...}}/gettoken。并且此 URI 不在我的域中。
在restTemplate 实例上调用exchange 方法之前,我需要将此(bearer)token 添加到header。
"uaaURL":"https://{{abc}}.{{de}}",
"clientID":"id-{{cid_value}}",
"clientSecret":"{{clientSecret_value}}",
"username":"value"
"samlAttributes":{
"Groups":["{{}}"],
"attribute1":["vaattr"]
}
任何示例/链接等将不胜感激。
【问题讨论】:
标签: java spring rest post oauth-2.0