not sure if the new k8s client and websocket stuff detects properly stale tokens (meaning we should redirect to the login page)
so that if a browser is left open for a while it keeps kinda working even though there's no way to connect back to the k8s REST service etc
We should push for refresh tokens probably. Having to relogin is a bit rubbish tbh.
Yeah, refresh token would be good, in the meantime we should handle the token expiry better, will take a look today.
There's keepalive requests being made by hawtio-oauth, if one of these fail it it'll bump you over to the login page:
[hawtio-os-oauth] keepaliveStatus: 200 hawtio-core.js:81 [hawtio-os-oauth] keepalive response: Object {kind: "User", apiVersion: "v1", metadata: Object, identities: Array[1], groups: null} hawtio-core.js:81 [hawtio-os-oauth] keepaliveStatus: 200 hawtio-core.js:81 [hawtio-os-oauth] keepalive response: Object {kind: "User", apiVersion: "v1", metadata: Object, identities: Array[1], groups: null}
unless I suppose if the console stops sending these after some time...
Ah, with longer times we try and poll less frequently... Could be a bug in there then.
Hmm, that code seemed okay, though if we don't calculate a valid keepalive time it defaults to polling every 10 minutes, I tuned this down to 10 seconds in this commit -> https://github.com/hawtio/hawtio-oauth let's see if that helps.