Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get Authorization header from an MethodInterpcetor on micronaut? #1

Conversation

Tester2012
Copy link

Showcase how an authorization header can be intercepted in HeadInterceptor

Showcase how an authorization header can be intercepted in HeadInterceptor
@j1cs
Copy link
Owner

j1cs commented Apr 3, 2021

Yeah I made that in the end (on my real project) But i don't like that way. I still think there's another way to do it.
Actually if you see the controller I coded other examples and that's one of them.

@j1cs j1cs closed this Apr 3, 2021
@Tester2012
Copy link
Author

Yeah I made that in the end (on my real project) But i don't like that way. I still think there's another way to do it.
Actually if you see the controller I coded other examples and that's one of them.

when you say you hope there's another way, do you mean like doing it in the interceptor class or some other class?

@j1cs
Copy link
Owner

j1cs commented Apr 3, 2021

I mean there may be another way.
My requirements are:
it can be validated with @Validate.
Capture the content of Authorization, take the value and put it inside my class Request.

All this can be with a Filter or Interceptor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants