OpenAPITools / OpenAPITools/openapi-generator
[REQ] [JAVA] [SPRING] add option to pass authorization token in a method parameter instead of interceptor
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
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);
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named. Start by tracing Java Spring client generation and the current authorization interceptor handling; determine where method parameters are represented in the generated client. Done means the generated method can accept an Authorization value per call instead of relying only on the interceptor, with coverage for simultaneous principals.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, openapi, spring
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100