Global Bearer Token
manoger opened this issue · comments
Hello,
I have an application in microservice architecture that needs a bearer token through the proxy to access all the APIs is possible to do it?
It is an springfox ability, try https://springfox.github.io/springfox/docs/current/#securing-swagger-ui or any other manual in internet and apply it on gateway
Not yet,
I'm figuring out how to use the zuul-swagger lib.
My Zuul api don't renders "http://localhost:(port)/swagger-ui.html" in the browser.
the console is saying:
2019-09-21 20:29:15.672 ERROR 6004 --- [nio-8762-exec-9] r.r.z.s.s.ZuulSwaggerResourceProvider : Some error during obtain swagger documentation for route 'player-service'
java.lang.IllegalArgumentException: [httpplayer-service] is not a valid HTTP URL
at org.springframework.web.util.UriComponentsBuilder.fromHttpUrl(UriComponentsBuilder.java:290) ~[spring-web-5.1.5.RELEASE.jar:5.1.5.RELEASE]
at ru.reliabletech.zuul.swagger.service.GenericSwaggerService.getServiceSwaggerBaseUrlBuilder(GenericSwaggerService.java:107) ~[zuul-springfox-swagger-0.3.0.jar:na]
at ru.reliabletech.zuul.swagger.service.GenericSwaggerService.getSwaggerResources(GenericSwaggerService.java:60) ~[zuul-springfox-swagger-0.3.0.jar:na]
at ru.reliabletech.zuul.swagger.swagger.ZuulSwaggerResourceProvider.generateSwaggerDocumentationResource(ZuulSwaggerResourceProvider.java:51) ~[zuul-springfox-swagger-0.3.0.jar:na]
From the stack error, for some reason it's attaching http in front of my service name.
And I would like to ignore some API to be rendered too.
can you provide your configuration?
oh, sorry. I've undone my swagger project and tried in an alternative way.
So far, this approach is working for me.
https://piotrminkowski.wordpress.com/2017/04/14/microservices-api-documentation-with-swagger2/