-
Notifications
You must be signed in to change notification settings - Fork 147
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
Search for 'input_key' in Request Cookies #118
Comments
How do you send a request to your API using cookies ? As far I know APIs are stateless. |
Hey @robsontenorio, Thanks for having a look into this! :) Not sure if I understood you question correctly. On a high-level, this is what we do: The APIs are then directly used via JavaScript, the browser sends the Keycloak This way, we can even protect the Just wanted to let you know that we had a use case where we tweaked the guard a bit. Not sure if this is something that could be useful to others. Best, Lauritz |
Can I you send a PR with tests ? Please, also change the README. |
Hey there!
We recently had a use case where we wanted to use HttpOnly Cookies to transfer the Keycloak JWT instead of the
Authorization
header. The modifications to achieve that were rather minimal:We basically only had to add
?? $this->request->cookies->get($inputKey)
to https://github.com/robsontenorio/laravel-keycloak-guard/blob/master/src/KeycloakGuard.php#L61C56-L61C63.Maybe this is a use case that is also interesting for others?
Best,
Lauritz
The text was updated successfully, but these errors were encountered: