+ {msg && (
+
+ {msg.type === 'success' ?
:
}
+ {msg.text}
+
+ )}
+
+
+
+
+
+
+
{t('iam.title') || 'Oracle IAM Identity Domains'}
+
{t('iam.subtitle') || 'Integração OIDC para autenticação corporativa'}
+
+
+
+ {/* Auth Mode */}
+
+
+
+
+
+
{t('iam.authMode') || 'Modo de Autenticação'}
+
+
+ {t('iam.authModeDesc') || 'Define como os usuários se autenticam no sistema.'}
+
+
+ {(['local', 'oidc', 'both'] as const).map(mode => {
+ const selected = config.auth_mode === mode;
+ const labels: Record = {
+ local: { label: t('iam.modeLocal') || 'Local', desc: t('iam.modeLocalDesc') || 'Usuários locais com senha' },
+ oidc: { label: t('iam.modeOidc') || 'Oracle IAM', desc: t('iam.modeOidcDesc') || 'Somente SSO corporativo' },
+ both: { label: t('iam.modeBoth') || 'Ambos', desc: t('iam.modeBothDesc') || 'Local + Oracle IAM' },
+ };
+ return (
+
+ );
+ })}
+
+
+
+ {/* OIDC Configuration */}
+ {config.auth_mode !== 'local' && (
+ <>
+
+
+
+
+
+
{t('iam.oidcConfig') || 'Configuração OIDC'}
+
+
+
+
+
+
+
+ update('oidc_issuer', e.target.value)}
+ placeholder="https://idcs-xxx.identity.oraclecloud.com" style={{ fontFamily: 'var(--fm)' }} />
+
+
+
+
+
+
+ update('oidc_client_id', e.target.value)}
+ placeholder="ea58b04047fd4d8182a8bad4e3d0aff5" style={{ fontFamily: 'var(--fm)' }} />
+
+
+
+
+ update('oidc_client_secret', e.target.value)}
+ placeholder="••••••••" className="flex-1" style={{ fontFamily: 'var(--fm)' }} />
+
+
+
+
+
+
+
+
+ update('oidc_redirect_uri', e.target.value)}
+ placeholder="https://yourapp.com/api/auth/oidc/callback" style={{ fontFamily: 'var(--fm)' }} />
+
+
+
+
+ {/* Group Mapping */}
+
+
+
+
+
+
{t('iam.groupMapping') || 'Mapeamento de Grupos'}
+
+
+ {t('iam.groupMappingDesc') || 'Mapeie os grupos do OCI Identity Domain para as roles do sistema.'}
+
+
+
+
+ >
+ )}
+
+ {/* Save */}
+
+
+
+
+ );
+}
diff --git a/frontend-react/src/pages/admin/UsersPage.tsx b/frontend-react/src/pages/admin/UsersPage.tsx
index 758b8ab..b173e0d 100644
--- a/frontend-react/src/pages/admin/UsersPage.tsx
+++ b/frontend-react/src/pages/admin/UsersPage.tsx
@@ -1,7 +1,6 @@
import { useState, useEffect, useCallback } from 'react';
-import { Users, Plus, Shield, Eye, User as UserIcon, Trash2, X, AlertTriangle, CheckCircle, Loader2, UserPlus, Lock, ShieldCheck, ShieldOff, KeyRound, Clock } from 'lucide-react';
+import { Users, Plus, Shield, Eye, User as UserIcon, Trash2, X, AlertTriangle, CheckCircle, Loader2, UserPlus, Lock, ShieldCheck, ShieldOff, KeyRound } from 'lucide-react';
import client from '@/api/client';
-import { adminApi } from '@/api/endpoints/admin';
import { useAuthStore } from '@/stores/auth';
import { useI18n } from '@/i18n';
@@ -38,29 +37,6 @@ export default function UsersPage() {
const [msg, setMsg] = useState<{ text: string; type: 'success' | 'error' } | null>(null);
const [submitting, setSubmitting] = useState(false);
- // Timezone
- const [timezone, setTimezone] = useState('');
- const [tzOptions, setTzOptions] = useState