Eine Quelle für Server und Admin-UI: - `AdminLoginResponse`: Union aus `AdminMfaChallenge` (`mfaRequired: true`) und `AdminLoginSession` (`token`, `user`, `amr`, `mfaEnrollmentRecommended`). Die Diskriminante ist `mfaRequired`, damit Clients sauber narrowen. - `AdminAuthMethod` (`pwd|totp|recovery|webauthn`) vs. `AdminMfaMethod` (ohne `pwd`) — Go schreibt `pwd` immer in `amr`, bietet es aber nie als Faktor an. - `AdminMfaStatus`, `AdminMfaTotpEnrollment`, `AdminMfaConfirmResult`, `AdminStepUpResult`. - WebAuthn: `AdminWebAuthnCreationOptions`, `AdminWebAuthnRequestOptions`, `AdminWebAuthnCredentialJSON`, `AdminWebAuthnCredentialView`, `AdminAuthenticatorTransport`. Type-Tests in `types-test/admin-auth.ts`: `Expect<Equal<…>>`-Assertions und `@ts-expect-error` für die nicht möglichen Felder der Challenge. `npm test` führt jetzt Schemas **und** `tsc` aus (TypeScript als devDependency).
20 lines
482 B
JSON
20 lines
482 B
JSON
{
|
|
"include": ["demo-api/**/*", "types-test/**/*"],
|
|
"compilerOptions": {
|
|
"target": "es2020",
|
|
"typeRoots": ["."],
|
|
"module": "commonjs",
|
|
"noImplicitAny": true,
|
|
"noImplicitThis": true,
|
|
"strictNullChecks": true,
|
|
"strictFunctionTypes": true,
|
|
"types": [],
|
|
"noEmit": true,
|
|
"forceConsistentCasingInFileNames": true,
|
|
|
|
"allowJs": true,
|
|
"checkJs": true
|
|
},
|
|
"files": ["index.d.ts"]
|
|
}
|