from __future__ import annotations import streamlit as st from app.config import SETTINGS_PREFIX, get_location def render_env_check() -> None: with st.expander("Проверка env окружения"): st.write(f"Текущий режим: `{get_location()}`") st.code( f"{SETTINGS_PREFIX}LOCATION=local # для локального mock-режима", language="text", ) def render_profile(profile: dict) -> None: st.success("Аутентификация через Keycloak Raisa выполнена.") st.subheader("Профиль пользователя") st.json( { "email": profile.get("email"), "preferred_username": profile.get("preferred_username"), "name": profile.get("name") or profile.get("full_name"), "realm_roles": profile.get("realm_access", {}).get("roles", []), } )