Problem
My service is written in Java Spring and I want to use open feign for rest clients. My service performs simultaneously multiple actions, each on behalf of a different principal. As of now an interceptor the only option to authorize requests, and it is cumbersome to use interceptor in my service, as the interceptor have no easy way of knowing what principal to use.
Solution
I would like to pass authorization in a method parameter instead of using interceptor. E.g.
String somethingGet(@RequestHeader(value = "Authorization") String auth);
Problem
My service is written in Java Spring and I want to use open feign for rest clients. My service performs simultaneously multiple actions, each on behalf of a different principal. As of now an interceptor the only option to authorize requests, and it is cumbersome to use interceptor in my service, as the interceptor have no easy way of knowing what principal to use.
Solution
I would like to pass authorization in a method parameter instead of using interceptor. E.g.