feat: login via passkey

This commit is contained in:
Jacky 2024-09-15 20:32:03 +08:00
parent 44c3180df7
commit bdfbbd0e8f
No known key found for this signature in database
GPG key ID: 215C21B10DF38B4D
37 changed files with 1529 additions and 643 deletions

View file

@ -53,6 +53,10 @@ func TestSetup(t *testing.T) {
_ = os.Setenv("NGINX_UI_LOGROTATE_CMD", "logrotate /custom/logrotate.conf")
_ = os.Setenv("NGINX_UI_LOGROTATE_INTERVAL", "60")
_ = os.Setenv("NGINX_UI_WEBAUTHN_RP_DISPLAY_NAME", "WebAuthn")
_ = os.Setenv("NGINX_UI_WEBAUTHN_RPID", "localhost")
_ = os.Setenv("NGINX_UI_WEBAUTHN_RP_ORIGINS", "http://localhost:3002")
ConfPath = "app.testing.ini"
Setup()
@ -98,6 +102,10 @@ func TestSetup(t *testing.T) {
assert.Equal(t, "logrotate /custom/logrotate.conf", LogrotateSettings.CMD)
assert.Equal(t, 60, LogrotateSettings.Interval)
assert.Equal(t, "WebAuthn", WebAuthnSettings.RPDisplayName)
assert.Equal(t, "localhost", WebAuthnSettings.RPID)
assert.Equal(t, []string{"http://localhost:3002"}, WebAuthnSettings.RPOrigins)
os.Clearenv()
_ = os.Remove("app.testing.ini")
}