Add local password-TOTP sessions and scoped revocable MCP tokens
This commit is contained in:
@@ -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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user