Cloudfoundry UAA refresh_token问题

时间:2016-09-28 14:40:12

标签: cloudfoundry-uaa

在api文档中跟随时,我遇到了尝试刷新不透明令牌的问题。

https://docs.cloudfoundry.org/api/uaa/#refresh-token

我的本​​地uaa实例(v3.6)的响应方式与示例中显示的不同,响应的access_token和refresh_token不是不透明的。这就像忽略了我传递的token_format = opaque参数。

curl 'http://192.168.99.100/auth/oauth/token' -i -X POST -H 'Accept: application/json' -H 'Content-Type: application/x-www-form-urlencoded' -d 'client_id=testclientid&client_secret=testclientsecret&grant_type=refresh_token&token_format=opaque&refresh_token=ea4bedd10c2748a284be95b8ffee6ae6-r'
HTTP/1.1 200 OK
Server: nginx/1.11.4
Date: Wed, 28 Sep 2016 13:57:54 GMT
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Cache-Control: no-store
Pragma: no-cache
X-XSS-Protection: 1; mode=block
X-Frame-Options: DENY
X-Content-Type-Options: nosniff

{"access_token":"eyJhbGciOiJIUzI1NiIsImtpZCI6ImxlZ2FjeS10b2tlbi1rZXkiLCJ0eXAiOiJKV1QifQ.eyJqdGkiOiJlYTRiZWRkMTBjMjc0OGEyODRiZTk1YjhmZmVlNmFlNiIsInN1YiI6IjBjNzk4MjI1LTg2NWItNDkzOC1iNmM2LTg4MzMyNzdkMDI0NSIsInNjb3BlIjpbImhhd2tleWUucmVhZCIsInBhc3N3b3JkLndyaXRlIiwib3BlbmlkIl0sImNsaWVudF9pZCI6Im15d2ViYXBwIiwiY2lkIjoibXl3ZWJhcHAiLCJhenAiOiJteXdlYmFwcCIsInJldm9jYWJsZSI6dHJ1ZSwiZ3JhbnRfdHlwZSI6InBhc3N3b3JkIiwidXNlcl9pZCI6IjBjNzk4MjI1LTg2NWItNDkzOC1iNmM2LTg4MzMyNzdkMDI0NSIsIm9yaWdpbiI6InVhYSIsInVzZXJfbmFtZSI6InBhdWwiLCJlbWFpbCI6InBhdWxAdGVzdC5vcmciLCJyZXZfc2lnIjoiNjg4NDEzOTQiLCJpYXQiOjE0NzUwNzEwNzQsImV4cCI6MTQ3NTA3MTEzNCwiaXNzIjoiaHR0cDovL2xvY2FsaG9zdDo4MDgwL3VhYS9vYXV0aC90b2tlbiIsInppZCI6InVhYSIsImF1ZCI6WyJwYXNzd29yZCIsIm9wZW5pZCIsIm15d2ViYXBwIiwiaGF3a2V5ZSJdfQ.eeM0LIvHgRBnd_7SwZChcLcD7ljXBGiTFbudl8UEK78","token_type":"bearer","refresh_token":"eyJhbGciOiJIUzI1NiIsImtpZCI6ImxlZ2FjeS10b2tlbi1rZXkiLCJ0eXAiOiJKV1QifQ.eyJqdGkiOiJlYTRiZWRkMTBjMjc0OGEyODRiZTk1YjhmZmVlNmFlNi1yIiwic3ViIjoiMGM3OTgyMjUtODY1Yi00OTM4LWI2YzYtODgzMzI3N2QwMjQ1Iiwic2NvcGUiOlsib3BlbmlkIiwiaGF3a2V5ZS5yZWFkIiwicGFzc3dvcmQud3JpdGUiXSwiaWF0IjoxNDc1MDcxMDI3LCJleHAiOjE0NzUwNzEzMjcsImNpZCI6Im15d2ViYXBwIiwiY2xpZW50X2lkIjoibXl3ZWJhcHAiLCJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjgwODAvdWFhL29hdXRoL3Rva2VuIiwiemlkIjoidWFhIiwicmV2b2NhYmxlIjp0cnVlLCJncmFudF90eXBlIjoicGFzc3dvcmQiLCJ1c2VyX25hbWUiOiJwYXVsIiwib3JpZ2luIjoidWFhIiwidXNlcl9pZCI6IjBjNzk4MjI1LTg2NWItNDkzOC1iNmM2LTg4MzMyNzdkMDI0NSIsInJldl9zaWciOiI2ODg0MTM5NCIsImF1ZCI6WyJwYXNzd29yZCIsIm9wZW5pZCIsIm15d2ViYXBwIiwiaGF3a2V5ZSJdfQ.F2Vm27gZ68rtZ0Ikf5oenVwWZ4YAOxff4sa563MYkUo","expires_in":59,"scope":"hawkeye.read password.write openid","jti":"ea4bedd10c2748a284be95b8ffee6ae6"}

有谁知道为什么?

1 个答案:

答案 0 :(得分:2)

转而使用v3.7 for UAA,此问题不再存在。