Skip to content

CustomValidator which implemented TokenValidator is not called #1786

@PrkPrabha-Bosch

Description

@PrkPrabha-Bosch

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions