diff options
author | 2023-11-06 04:27:35 +1030 | |
---|---|---|
committer | 2023-11-05 18:57:35 +0100 | |
commit | 62ef8ed57aab9f2b05a64b153d231ae4f42769f4 (patch) | |
tree | acc33ab1fd02113f8fc93751e593dc67ff504a84 /internal/config/options.go | |
parent | 62188b49f072ea3c2bf30a8ed42f8b9303840191 (diff) | |
download | v2-62ef8ed57aab9f2b05a64b153d231ae4f42769f4.tar.gz v2-62ef8ed57aab9f2b05a64b153d231ae4f42769f4.tar.zst v2-62ef8ed57aab9f2b05a64b153d231ae4f42769f4.zip |
Add WebAuthn / Passkey integration
This is a rebase of #1618 in which @dave-atx added WebAuthn support.
Closes #1618
Diffstat (limited to '')
-rw-r--r-- | internal/config/options.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/internal/config/options.go b/internal/config/options.go index 11a4ac2c..5ee4ae69 100644 --- a/internal/config/options.go +++ b/internal/config/options.go @@ -81,6 +81,7 @@ const ( defaultMetricsPassword = "" defaultWatchdog = true defaultInvidiousInstance = "yewtu.be" + defaultWebAuthn = true ) var defaultHTTPClientUserAgent = "Mozilla/5.0 (compatible; Miniflux/" + version.Version + "; +https://miniflux.app)" @@ -161,6 +162,7 @@ type Options struct { watchdog bool invidiousInstance string proxyPrivateKey []byte + webAuthn bool } // NewOptions returns Options with default values. @@ -235,6 +237,7 @@ func NewOptions() *Options { watchdog: defaultWatchdog, invidiousInstance: defaultInvidiousInstance, proxyPrivateKey: randomKey, + webAuthn: defaultWebAuthn, } } @@ -592,6 +595,11 @@ func (o *Options) ProxyPrivateKey() []byte { return o.proxyPrivateKey } +// WebAuthn returns true if WebAuthn logins are supported +func (o *Options) WebAuthn() bool { + return o.webAuthn +} + // SortedOptions returns options as a list of key value pairs, sorted by keys. func (o *Options) SortedOptions(redactSecret bool) []*Option { var keyValues = map[string]interface{}{ @@ -665,6 +673,7 @@ func (o *Options) SortedOptions(redactSecret bool) []*Option { "WATCHDOG": o.watchdog, "WORKER_POOL_SIZE": o.workerPoolSize, "YOUTUBE_EMBED_URL_OVERRIDE": o.youTubeEmbedUrlOverride, + "WEBAUTHN": o.webAuthn, } keys := make([]string, 0, len(keyValues)) |