From 9389f8af74dbc2f5a4c5fce6e96cc48956a85f4c Mon Sep 17 00:00:00 2001 From: Eliel Sousa Date: Wed, 23 Sep 2026 14:35:15 -0300 Subject: [PATCH] feat(auth): expandir catalogo de desafios anti-bot para 36 itens e validar clique estrito --- src/litellm_rtksync/locales/en.json | 30 +++++++++++- src/litellm_rtksync/locales/es.json | 30 +++++++++++- src/litellm_rtksync/locales/pt.json | 30 +++++++++++- src/litellm_rtksync/protecao.py | 28 +++++++++++ src/litellm_rtksync/render.py | 75 ++++++++++++++++++++++------- 5 files changed, 172 insertions(+), 21 deletions(-) diff --git a/src/litellm_rtksync/locales/en.json b/src/litellm_rtksync/locales/en.json index 316ca3c..c6f3a93 100644 --- a/src/litellm_rtksync/locales/en.json +++ b/src/litellm_rtksync/locales/en.json @@ -293,5 +293,33 @@ "type.oauth": "OAuth 2.0", "type.synced_model": "Synced model", "type.virtual_key": "Virtual key", - "auth.authentication": "Authentication" + "auth.authentication": "Authentication", + "auth.item_airplane": "Airplane", + "auth.item_award": "Award", + "auth.item_bicycle": "Bicycle", + "auth.item_camera": "Camera", + "auth.item_cloud": "Cloud", + "auth.item_compass": "Compass", + "auth.item_cpu": "CPU", + "auth.item_cup": "Cup", + "auth.item_droplet": "Droplet", + "auth.item_fire": "Fire", + "auth.item_flag": "Flag", + "auth.item_flower": "Flower", + "auth.item_gem": "Gem", + "auth.item_gift": "Gift", + "auth.item_globe": "Globe", + "auth.item_laptop": "Laptop", + "auth.item_moon": "Moon", + "auth.item_palette": "Palette", + "auth.item_phone": "Phone", + "auth.item_rocket": "Rocket", + "auth.item_sun": "Sun", + "auth.item_terminal": "Terminal", + "auth.item_tree": "Tree", + "auth.item_trophy": "Trophy", + "auth.item_truck": "Truck", + "auth.item_umbrella": "Umbrella", + "auth.item_watch": "Watch", + "auth.item_wifi": "Wi-Fi" } diff --git a/src/litellm_rtksync/locales/es.json b/src/litellm_rtksync/locales/es.json index 9d75171..48fdcfe 100644 --- a/src/litellm_rtksync/locales/es.json +++ b/src/litellm_rtksync/locales/es.json @@ -293,5 +293,33 @@ "type.oauth": "OAuth 2.0", "type.synced_model": "Modelo sincronizado", "type.virtual_key": "Clave virtual", - "auth.authentication": "Autenticación" + "auth.authentication": "Autenticación", + "auth.item_airplane": "Avión", + "auth.item_award": "Medalla", + "auth.item_bicycle": "Bicicleta", + "auth.item_camera": "Cámara", + "auth.item_cloud": "Nube", + "auth.item_compass": "Brújula", + "auth.item_cpu": "Procesador", + "auth.item_cup": "Taza", + "auth.item_droplet": "Gota", + "auth.item_fire": "Fuego", + "auth.item_flag": "Bandera", + "auth.item_flower": "Flor", + "auth.item_gem": "Diamante", + "auth.item_gift": "Regalo", + "auth.item_globe": "Globo", + "auth.item_laptop": "Portátil", + "auth.item_moon": "Luna", + "auth.item_palette": "Paleta", + "auth.item_phone": "Teléfono", + "auth.item_rocket": "Cohete", + "auth.item_sun": "Sol", + "auth.item_terminal": "Terminal", + "auth.item_tree": "Árbol", + "auth.item_trophy": "Trofeo", + "auth.item_truck": "Camión", + "auth.item_umbrella": "Paraguas", + "auth.item_watch": "Reloj", + "auth.item_wifi": "Wi-Fi" } diff --git a/src/litellm_rtksync/locales/pt.json b/src/litellm_rtksync/locales/pt.json index 330000b..94b2fc2 100644 --- a/src/litellm_rtksync/locales/pt.json +++ b/src/litellm_rtksync/locales/pt.json @@ -293,5 +293,33 @@ "type.oauth": "OAuth 2.0", "type.synced_model": "Modelo sincronizado", "type.virtual_key": "Chave virtual", - "auth.authentication": "Autenticação" + "auth.authentication": "Autenticação", + "auth.item_airplane": "Avião", + "auth.item_award": "Medalha", + "auth.item_bicycle": "Bicicleta", + "auth.item_camera": "Câmera", + "auth.item_cloud": "Nuvem", + "auth.item_compass": "Bússola", + "auth.item_cpu": "Processador", + "auth.item_cup": "Xícara", + "auth.item_droplet": "Gota", + "auth.item_fire": "Fogo", + "auth.item_flag": "Bandeira", + "auth.item_flower": "Flor", + "auth.item_gem": "Diamante", + "auth.item_gift": "Presente", + "auth.item_globe": "Globo", + "auth.item_laptop": "Notebook", + "auth.item_moon": "Lua", + "auth.item_palette": "Paleta", + "auth.item_phone": "Celular", + "auth.item_rocket": "Foguete", + "auth.item_sun": "Sol", + "auth.item_terminal": "Terminal", + "auth.item_tree": "Árvore", + "auth.item_trophy": "Troféu", + "auth.item_truck": "Caminhão", + "auth.item_umbrella": "Guarda-chuva", + "auth.item_watch": "Relógio", + "auth.item_wifi": "Wi-Fi" } diff --git a/src/litellm_rtksync/protecao.py b/src/litellm_rtksync/protecao.py index f7610e2..cfb27d6 100644 --- a/src/litellm_rtksync/protecao.py +++ b/src/litellm_rtksync/protecao.py @@ -50,6 +50,34 @@ ("bell", "bi-bell-fill"), ("lightning", "bi-lightning-fill"), ("gear", "bi-gear-fill"), + ("sun", "bi-sun-fill"), + ("moon", "bi-moon-stars-fill"), + ("cloud", "bi-cloud-fill"), + ("fire", "bi-fire"), + ("droplet", "bi-droplet-fill"), + ("tree", "bi-tree-fill"), + ("flower", "bi-flower1"), + ("gem", "bi-gem"), + ("trophy", "bi-trophy-fill"), + ("award", "bi-award-fill"), + ("gift", "bi-gift-fill"), + ("compass", "bi-compass-fill"), + ("flag", "bi-flag-fill"), + ("globe", "bi-globe"), + ("camera", "bi-camera-fill"), + ("cup", "bi-cup-hot-fill"), + ("palette", "bi-palette-fill"), + ("umbrella", "bi-umbrella-fill"), + ("rocket", "bi-rocket-takeoff-fill"), + ("airplane", "bi-airplane-fill"), + ("bicycle", "bi-bicycle"), + ("truck", "bi-truck"), + ("cpu", "bi-cpu-fill"), + ("terminal", "bi-terminal-fill"), + ("laptop", "bi-laptop"), + ("phone", "bi-phone-fill"), + ("watch", "bi-watch"), + ("wifi", "bi-wifi"), ) MAPA_ICONES: Dict[str, str] = dict(ITENS_DESAFIO) diff --git a/src/litellm_rtksync/render.py b/src/litellm_rtksync/render.py index fd824a2..6cedd5e 100644 --- a/src/litellm_rtksync/render.py +++ b/src/litellm_rtksync/render.py @@ -429,7 +429,7 @@ def render_login_page( ) grade_botoes = "".join(botoes) desafio_html = f""" -
+
""" else: desafio_html = ( @@ -462,23 +501,23 @@ def render_login_page( botoes_sso = [] if oidc_nome and saml_nome and oidc_nome == saml_nome: rotulo_oidc = f"{oidc_nome} (OIDC)" - rotulo_saml = f"{saml_nome} (SAML)" + rotulo_saml = f"{saml_nome} (SAML 2.0)" else: - rotulo_oidc = oidc_nome - rotulo_saml = saml_nome + rotulo_oidc = f"{oidc_nome} (OIDC)" if oidc_nome and "oidc" not in oidc_nome.lower() else oidc_nome + rotulo_saml = f"{saml_nome} (SAML 2.0)" if saml_nome and "saml" not in saml_nome.lower() else saml_nome if rotulo_oidc: botoes_sso.append( f'' - f'' + f'' f'{esc(translate("sso.sign_in_with", lang, provider=rotulo_oidc))}' ) if rotulo_saml: botoes_sso.append( f'' - f'' + f'' f'{esc(translate("sso.sign_in_with", lang, provider=rotulo_saml))}' ) elif sso_indisponivel and not botoes_sso: @@ -1447,9 +1486,9 @@ def render_sso_modal( if hasattr(sso_view, "base_url"): sso_obj = sso_view prov = sso_obj.provedor - senha_hab = sso_obj.senha_esta_ligada() - oidc_hab = sso_obj.oidc_esta_ligado() - saml_hab = sso_obj.saml_esta_ligado() + senha_hab = sso_obj.senha_habilitada + oidc_hab = sso_obj.oidc_habilitado + saml_hab = sso_obj.saml_habilitado base_url = sso_obj.base_url or "" issuer = sso_obj.issuer or "" client_id = sso_obj.client_id or ""