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

CustomValidator which implemented TokenValidator is not called #1786

Open
PrkPrabha-Bosch opened this issue Sep 4, 2024 · 0 comments
Open

Comments

@PrkPrabha-Bosch
Copy link

Issue description

I have requirement as below.

  1. Getting call from client with Bearer token.
  2. Need to validate the token using auth service (Introspect) and get response
  3. Response will have roles
  4. Inject those roles into Authentication object
  5. So, that I can use @secured or @RolesAllowed annotation to authorize the services

Approach1 : I have configuration as below.

micronaut:
security:
enabled: true
oauth2:
enabled: true
introspection:
url: <>
auth:
client-id: <>
client-secret: <>
roles-name: "roles"
token:
jwt:
enabled: true
But this is not making call to Introspect URL.

Approach 2 : I have tried to implement own validator using io.micronaut.security.token.validator.TokenValidator. But this is not triggered when i make call to the application service.

Please help to resolve this issue.

@sdelamo sdelamo self-assigned this Sep 6, 2024
@sdelamo sdelamo removed their assignment Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

2 participants