Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

走网关获取数据就是invalid_token, 这个是什么问题? #25

Closed
ljh205sy opened this issue Feb 20, 2019 · 3 comments
Closed

Comments

@ljh205sy
Copy link

ljh205sy commented Feb 20, 2019

在Micro-Service-Skeleton-Gateway中有一段配置,如果是直接走网关user-info-uri: http://localhost:9030/uaa/user, 获取接口数据时显示的是invalid_token。

不走网关使用user-info-uri: http://localhost:9060/user 就是成功的,不知道有什么区别?
如果有多个Micro-Service-Skeleton-Auth服务,怎么实现高可用?难道要使用nginx进行代理吗?如果走网关应该是不需要的。

security:
oauth2:
resource:
#获得授权端的当前用户信息url
#user-info-uri: http://localhost:9030/uaa/user, 如果是这样就访问不了,不知道为啥子??
user-info-uri: http://localhost:9060/user
prefer-token-info: false

@ljh205sy
Copy link
Author

在Micro-Service-Skeleton-Gateway中有一段配置,如果是直接走网关user-info-uri: http://localhost:9030/uaa/user, 获取接口数据时显示的是invalid_token。

不走网关使用user-info-uri: http://localhost:9060/user 就是成功的,不知道有什么区别?
如果有多个Micro-Service-Skeleton-Auth服务,怎么实现高可用?难道要使用nginx进行代理吗?如果走网关应该是不需要的。

security:
oauth2:
resource:
#获得授权端的当前用户信息url
#user-info-uri: http://localhost:9030/uaa/user, 如果是这样就访问不了,不知道为啥子??
user-info-uri: http://localhost:9060/user
prefer-token-info: false

@yangxiufeng666
Copy link
Owner

@ljh205sy 请换成如下,具体看我的这篇https://blog.csdn.net/w1054993544/article/details/86606732
security:
oauth2:
resource:
user-info-uri: http://uaa/user
loadBalanced: true
记得要下载最新代码。

@ljh205sy
Copy link
Author

security:
oauth2:
resource:
user-info-uri: http://localhost:9030/uaa/user,
loadBalanced: true
这种方式到时候试试,不知道是否可行

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants