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

Can you enhance the oathController so that the refreshtoken can have a prefix #1763

Open
tucker-eventpipe opened this issue Aug 8, 2024 · 0 comments

Comments

@tucker-eventpipe
Copy link

Feature description

So going out you can set a prefix for both the JWT cookie and the refresh token cookie, but coming in the OauthController the JWT_REFRESH_TOKEN is hard coded with no prefix, so you can set a prefix going out but it wouldn't be checked coming back. One of my coworkers was working on this trying to get it going but I know he won't have time to put in a ticket for it so I am.

The prefix can be set with:

micronaut:
  security:
    token:
      refresh:
        cookie:
          cookie-name: '${JWT_TOKEN_PREFIX:}JWT_REFRESH_TOKEN'

Where the cookie is hard coded is here:
https://github.com/micronaut-projects/micronaut-security/blob/4.9.x/security/src/main/java/io/micronaut/security/endpoints/OauthController.java#L99
https://github.com/micronaut-projects/micronaut-security/blob/4.9.x/security/src/main/java/io/micronaut/security/endpoints/OauthController.java#L114

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

No branches or pull requests

1 participant