mirror of
https://github.com/h44z/wg-portal.git
synced 2026-11-20 12:43:26 +01:00
* feat: expose editable key capability to frontend Signed-off-by: I.F. <131729144+FukumotoIkuma@users.noreply.github.com> * feat: expose editable keys setting Signed-off-by: I.F. <131729144+FukumotoIkuma@users.noreply.github.com> * feat: add browser WireGuard key and config helpers Signed-off-by: I.F. <131729144+FukumotoIkuma@users.noreply.github.com> * feat: support browser-only key generation for self provisioning Signed-off-by: I.F. <131729144+FukumotoIkuma@users.noreply.github.com> * fix: hide server config actions without private key Signed-off-by: I.F. <131729144+FukumotoIkuma@users.noreply.github.com> * refactor: share browser WireGuard key helpers Signed-off-by: I.F. <131729144+FukumotoIkuma@users.noreply.github.com> * refactor: reuse WireGuard browser key helpers Signed-off-by: I.F. <131729144+FukumotoIkuma@users.noreply.github.com> * fix: address review feedback for client-side key generation - Make generated key fields read-only so the downloaded config always matches the registered public key - Drop unreachable error handling and defensive branches; mirror wg_peer.tpl in the config builder - Keep only the keypair helper shared with KeyGeneraterView - Restore trailing newlines and remove the duplicated help text - Document browser-side key generation and add EditableKeys to the v0 swagger spec Signed-off-by: I.F. <131729144+FukumotoIkuma@users.noreply.github.com> * test: cover EditableKeys setting and browser-generated peer keys Signed-off-by: I.F. <131729144+FukumotoIkuma@users.noreply.github.com> * improve ui, fix potential race condition --------- Signed-off-by: I.F. <131729144+FukumotoIkuma@users.noreply.github.com> Co-authored-by: Christoph <christoph.h@sprinternet.at>
26 lines
1002 B
Go
26 lines
1002 B
Go
package model
|
|
|
|
type Error struct {
|
|
Code int `json:"Code"`
|
|
Message string `json:"Message"`
|
|
}
|
|
|
|
type Settings struct {
|
|
MailLinkOnly bool `json:"MailLinkOnly"`
|
|
PersistentConfigSupported bool `json:"PersistentConfigSupported"`
|
|
SelfProvisioning bool `json:"SelfProvisioning"`
|
|
EditableKeys bool `json:"EditableKeys"`
|
|
ApiAdminOnly bool `json:"ApiAdminOnly"`
|
|
WebAuthnEnabled bool `json:"WebAuthnEnabled"`
|
|
MinPasswordLength int `json:"MinPasswordLength"`
|
|
AvailableBackends []SettingsBackendNames `json:"AvailableBackends"`
|
|
LoginFormVisible bool `json:"LoginFormVisible"`
|
|
CreateDefaultPeer bool `json:"CreateDefaultPeer"`
|
|
}
|
|
|
|
type SettingsBackendNames struct {
|
|
Id string `json:"Id"`
|
|
Name string `json:"Name"`
|
|
Type string `json:"Type"`
|
|
}
|