spring-cloud / spring-cloud-openfeign

Support for using OpenFeign in Spring Cloud apps
Apache License 2.0
1.17k stars 756 forks source link

New Feature #995

Closed harishwar-babu closed 3 months ago

harishwar-babu commented 4 months ago

Added new Feature JWT-Access-Token-Interceptor

OlgaMaciaszek commented 3 months ago

Hello, @harishwar-babu, a separate HttpServletRequest object is created for every HTTP request. How would you inject it as a field during bean creation?

harishwar-babu commented 3 months ago

As HttpServletRequest is already a component. So whenever the developer tries to use my Feature called JwtAccessTokenInterceptor, they need to create a bean for my feature upon creation, this httpservletRequest is also being created and injected by using the field injection strategy.

Thanks Harish Babu

On Tue, Mar 19, 2024 at 7:47 PM Olga Maciaszek-Sharma < @.***> wrote:

Hello, @harishwar-babu https://github.com/harishwar-babu, a separate HttpServletRequest object is created for every HTTP request. How would you inject it as a field during bean creation?

— Reply to this email directly, view it on GitHub https://github.com/spring-cloud/spring-cloud-openfeign/pull/995#issuecomment-2007302845, or unsubscribe https://github.com/notifications/unsubscribe-auth/APVZW7AZ6ASOLSY4FVRR3WTYZBCF5AVCNFSM6AAAAABDZOVJBKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBXGMYDEOBUGU . You are receiving this because you were mentioned.Message ID: @.***>

OlgaMaciaszek commented 3 months ago

Thanks, @harishwar-babu, but we are not going to be adding this feature at this point.

harishwar-babu commented 3 months ago

May I know the reason?

Thanks

On Tue, Mar 19, 2024 at 8:26 PM Olga Maciaszek-Sharma < @.***> wrote:

Thanks, @harishwar-babu https://github.com/harishwar-babu, but we are not going to be adding this feature at this point.

— Reply to this email directly, view it on GitHub https://github.com/spring-cloud/spring-cloud-openfeign/pull/995#issuecomment-2007402841, or unsubscribe https://github.com/notifications/unsubscribe-auth/APVZW7E4TWOTH7RD3FSXMHTYZBGYJAVCNFSM6AAAAABDZOVJBKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBXGQYDEOBUGE . You are receiving this because you were mentioned.Message ID: @.***>

OlgaMaciaszek commented 3 months ago

HttpServletRequest objects correspond to specific requests, while beans should correspond to components present throughout the lifecycle of the application.