Skip to content

Перехват 401/403 с редиректом на вход - #101

Merged
vladcheck merged 1 commit into
mainfrom
fix/94-auth-interceptor
Oct 16, 2026
Merged

vladcheck merged 1 commit into
mainfrom
fix/94-auth-interceptor

Conversation

@vladcheck

Copy link
Copy Markdown
Owner

Что

Перехват истёкшей сессии в базовом Controller: showError(Throwable) ведёт 401/403 на экран входа с очищенной сессией. Миграция 8 контроллеров, LoginForm исключён (неверный пароль остаётся на месте), once-флаг против параллельных 403.

Тесты: AuthInterceptorTest (5) + оба пути, весь сьют 255 зелёных.

Closes #94

Базовый Controller: общий showError(String) поверх getErrorLabel(), showError(Throwable) перехватывает 401/403 в session.clear() + goToLoginOnce(), хук interceptAuthFailure() (LoginFormController перекрывает в false). Navigator.goToLoginOnce() с once-флагом против параллельных 403. Все 8 контроллеров мигрированы. Тесты обоих путей 401/403, неверный пароль остаётся на форме, выход без мелькания.
@vladcheck
vladcheck merged commit 4e1a38b into main Oct 16, 2026
11 checks passed
@vladcheck
vladcheck deleted the fix/94-auth-interceptor branch October 16, 2026 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Роль не перепроверяется после открытия страницы (stale RBAC)

1 participant