JHipster-Registry Swagger UI for microservice says invalid_token with UAA

蹲街弑〆低调 提交于 2019-12-13 03:49:43

问题


I setup the following components using Jhipster (version of generator-jhipster: @ 5.3.1)

Gateway
Jhipster Registry
UAA Server

Everything works fine so far.

In Jhipster Registry, when I go to Administration >> API It opens up Swagger UI. Swagger UI lists the apis for Jhipster-Registry only. But it gives error when the uaa or gateway is selected in the drop down. Swagger UI From Gateway (Administration >> API) works fine. Only from registry it does not work.

Please let me know if I am missing some configuration.


回答1:


UAA support for the registry was just recently added and will be in the next release. If you want to have it early, you can make the following changes:

  • In your UAA app's UaaConfiguration.java, add .authorities("ROLE_ADMIN") here.

  • Then you can use the develop tag for the jhipster-registry Docker image, and add the uaa profile to that container's SPRING_ACTIVE_PROFILES

    • If you prefer to run the JHipster Registry from source, you can clone the jhipster-registry repository and check out the develop branch


来源:https://stackoverflow.com/questions/52311356/jhipster-registry-swagger-ui-for-microservice-says-invalid-token-with-uaa

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!