Basic Authentication service called By Zuul

后端 未结 6 751
闹比i
闹比i 2021-01-14 23:33

I\'m Zuul as edge server. so all request pass by this edge server. I have a micro-service A. all web services of A are protected by Basic Authentication. How can we call the

6条回答
  •  终归单人心
    2021-01-15 00:09

    Ideally the requester would have the token in the request.
    If you want to have Zuul add the authentication token then you can create a ZuulFilter and use:

    context.addZuulRequestHeader("Authorization", "base64encodedTokenHere");
    

    Doing this would give open access to the services - which may not be wise.

提交回复
热议问题