Connexion SSO via l'appairage sur le backend centralisé (2.17.0) #5
@@ -46,8 +46,12 @@ class AuthInterceptor @Inject constructor(
|
|||||||
|
|
||||||
// Still 401 after a clock-corrected retry: the secret is genuinely wrong or was
|
// Still 401 after a clock-corrected retry: the secret is genuinely wrong or was
|
||||||
// regenerated server-side. Broadcast so the UI can clear credentials and return
|
// regenerated server-side. Broadcast so the UI can clear credentials and return
|
||||||
// to the login screen.
|
// to the login screen — except for /api/v1/info, which is only ever called to
|
||||||
if (response.code == 401) {
|
// verify credentials (login / pairing verification). A 401 there must NOT wipe
|
||||||
|
// the credentials: for a pairing verification it would destroy a device secret
|
||||||
|
// that the server only issues once, for a possibly transient cause (Hub role
|
||||||
|
// cache, clock). The repository decides what to keep in that case.
|
||||||
|
if (response.code == 401 && !original.url.encodedPath.endsWith("/api/v1/info")) {
|
||||||
sessionManager.onUnauthorized()
|
sessionManager.onUnauthorized()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user