Getting User Principal
From Filter
#10036
-
The title says it all really. It seems although |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
It seems there is a |
Beta Was this translation helpful? Give feedback.
-
Security is handled in handlers - similar to your routing handlers. As security is bound by This means that filters cannot have security available, as they happen before routing. If you would need security at this point, you would need to implement it yourself - i.e. create a filter that is (somehow) configured to know how to secure the application (which endpoints, whether to authenticate, authorize etc.), and then use the existing Helidon APIs to execute the authentication and authorization - i.e. replicate what is now written in |
Beta Was this translation helpful? Give feedback.
Security is handled in handlers - similar to your routing handlers. As security is bound by
path
, and we use path matching of the routing.This means that filters cannot have security available, as they happen before routing.
If you would need security at this point, you would need to implement it yourself - i.e. create a filter that is (somehow) configured to know how to secure the application (which endpoints, whether to authenticate, authorize etc.), and then use the existing Helidon APIs to execute the authentication and authorization - i.e. replicate what is now written in
io.helidon.webserver.security.SecurityHandler#handle
- application of authentication and authorization is done in…