Extract types, constants, helpers, and UI pieces (shared LoadingSkeleton/ EmptyState/StatusBadge/CopyButton, SSOConfigFormModal, DeleteConfirmModal, ConnectionTestPanel, SSOConfigCard, SSOUsersTable, SSOInfoSection) into _components/ and _types.ts to bring page.tsx from 1482 LOC to 339 LOC (under the 500 hard cap). Behavior preserved. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
29 lines
819 B
TypeScript
29 lines
819 B
TypeScript
import type { SSOFormData } from '../_types'
|
|
|
|
export const FALLBACK_TENANT_ID = '00000000-0000-0000-0000-000000000001'
|
|
export const FALLBACK_USER_ID = '00000000-0000-0000-0000-000000000001'
|
|
export const API_BASE = '/api/sdk/v1/sso'
|
|
|
|
export const DEFAULT_SCOPES = 'openid,email,profile'
|
|
|
|
export const AVAILABLE_ROLES = [
|
|
{ value: 'user', label: 'Benutzer' },
|
|
{ value: 'admin', label: 'Administrator' },
|
|
{ value: 'data_protection_officer', label: 'Datenschutzbeauftragter' },
|
|
{ value: 'auditor', label: 'Auditor' },
|
|
{ value: 'viewer', label: 'Nur Lesen' },
|
|
]
|
|
|
|
export const EMPTY_FORM: SSOFormData = {
|
|
name: '',
|
|
provider_type: 'oidc',
|
|
issuer_url: '',
|
|
client_id: '',
|
|
client_secret: '',
|
|
redirect_uri: '',
|
|
scopes: DEFAULT_SCOPES,
|
|
auto_provision: true,
|
|
default_role: 'user',
|
|
role_mappings: [],
|
|
}
|