summaryrefslogtreecommitdiff
path: root/internal/configuration/decode_hooks.go
diff options
context:
space:
mode:
authorJames Elliott <james-d-elliott@users.noreply.github.com>2022-03-03 22:20:43 +1100
committerGitHub <noreply@github.com>2022-03-03 22:20:43 +1100
commit8f05846e214df843ad8b996525b65ebef02a5686 (patch)
tree7da518dd4a78ebaac2920add5e1163e7f7eb447c /internal/configuration/decode_hooks.go
parent3c0d9b3b5785de86801c3d839a4999d3ecbf37fb (diff)
feat: webauthn (#2707)
This implements Webauthn. Old devices can be used to authenticate via the appid compatibility layer which should be automatic. New devices will be registered via Webauthn, and devices which do not support FIDO2 will no longer be able to be registered. At this time it does not fully support multiple devices (backend does, frontend doesn't allow registration of additional devices). Does not support passwordless.
Diffstat (limited to 'internal/configuration/decode_hooks.go')
-rw-r--r--internal/configuration/decode_hooks.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/internal/configuration/decode_hooks.go b/internal/configuration/decode_hooks.go
index cc9aac697..f8ce99f6a 100644
--- a/internal/configuration/decode_hooks.go
+++ b/internal/configuration/decode_hooks.go
@@ -25,15 +25,14 @@ func StringToMailAddressFunc() mapstructure.DecodeHookFunc {
}
var (
- mailAddress *mail.Address
+ parsedAddress *mail.Address
)
- mailAddress, err = mail.ParseAddress(dataStr)
- if err != nil {
+ if parsedAddress, err = mail.ParseAddress(dataStr); err != nil {
return nil, fmt.Errorf("could not parse '%s' as a RFC5322 address: %w", dataStr, err)
}
- return *mailAddress, nil
+ return *parsedAddress, nil
}
}