Add local password-TOTP sessions and scoped revocable MCP tokens

This commit is contained in:
2026-11-17 20:05:28 +01:00
parent 7fe20df34f
commit 9fa0fb81ff
17 changed files with 1804 additions and 27 deletions
+11
View File
@@ -34,3 +34,14 @@ describe('server-announced auth configuration', () => {
expect(() => session({ principal: 'simulated-testprincipal-a', tenant_id: 't', csrf_token: 'csrf', roles: ['dev_test_member'] })).toThrow();
});
});
it('renders the local password and TOTP login only when explicitly enabled', () => {
const config = authConfig({ oidc_configured: false, oidc_login_url: null, dev_login_enabled: false, local_login_enabled: true });
const html = renderToStaticMarkup(<Login config={config} configError={null} onLogin={onLogin}/>);
expect(html).toContain('type="password"');
expect(html).toContain('Authenticator-Code');
expect(html).toContain('autoComplete="one-time-code"');
expect(html).not.toContain('SIMULIERTER');
expect(html).not.toContain('OIDC');
expect(() => authConfig({ oidc_configured:false, oidc_login_url:null, dev_login_enabled:false, local_login_enabled:'true' })).toThrow();
});