-
Notifications
You must be signed in to change notification settings - Fork 77
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
Fix/keycloak timeout #445
base: master
Are you sure you want to change the base?
Fix/keycloak timeout #445
Conversation
|
||
import uvicorn # type: ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import uvicorn # type: ignore | |
import uvicorn # type: ignore |
"client_id": db.config.openid_client_id, | ||
"client_secret": db.config.openid_secret, | ||
} | ||
url = "http://mquery-keycloak-1:8080/auth/realms/myrealm/protocol/openid-connect/token" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't be hardcoded - use url from config instead
@@ -70,6 +74,24 @@ def with_plugins() -> Iterable[PluginManager]: | |||
plugins.cleanup() | |||
|
|||
|
|||
def get_new_tokens(refresh_token): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add typing (I guess get_new_tokens(refresh_token: str) -> Tuple[str, str]
, but recheck)
Your checklist for this pull request
What is the current behaviour?
Currently mquery does not revoke token by itself therefore forcing relogin.
Also after token expiration user is forced to log in even if instance allows anonymous access,
What is the new behaviour?
Test plan
Token is auto-refreshing itself now.
Also when the token expires, user get anonymous access.
Also User is not logged out so often.
Closing issues
fixes #411
fixes #425