Skip to content

How to pragmatically get authentication object in any method ? #1015

Answered by sdelamo
siddharth223437 asked this question in Q&A
Discussion options

You must be logged in to vote

See: https://micronaut-projects.github.io/micronaut-security/latest/guide/#securityService

3.1 User outside of a controller

If you need to access the currently authenticated user outside of a controller, you can inject SecurityService bean, which provides a set of convenient methods related to authentication and authorization.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by graemerocher
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants