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

Refreshing tokens on non-GET requests #236

Open
ghost opened this issue Nov 19, 2018 · 3 comments
Open

Refreshing tokens on non-GET requests #236

ghost opened this issue Nov 19, 2018 · 3 comments

Comments

@ghost
Copy link

ghost commented Nov 19, 2018

Environment
  • lua-resty-openidc version 1.7.0
  • OpenID Connect provider Keycloak 4.1.0.Final
Expected behaviour

It could be nice to have possibility continue user request in oryginal form.

Actual behaviour

Token refreshing mechanism works for GET requests only.
eg. POST requests will refresh token but they will be changed to GET request, and message body is lost as we only store "target url" before redirects.
https://github.com/zmartzone/lua-resty-openidc/blob/master/lib/resty/openidc.lua#L1115

Minimized example

not needed

Configuration and NGINX server log files

not needed

@zandbelt
Copy link
Contributor

Yes, certainly a nice-to-have but it comes with its own complexity of where to store the POST data and avoid all types of security (client-side) or DoS (server-side) attacks.

@ghost
Copy link
Author

ghost commented Nov 19, 2018

IMHO this information should be somewhere among library limitiations. It's quite common to have web-app in eg. React that upon loading it's js may only (or mostly perform POST request). lua-resty-oidc will not be able to maintain SSO session despite user continous interactions.

@zandbelt
Copy link
Contributor

fair point indeed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant