|
|
@@ -57,7 +57,7 @@ func (u WebAuthnUser) WebAuthnCredentials() []webauthn.Credential {
|
|
|
return creds
|
|
|
}
|
|
|
|
|
|
-func newWebAuthn(h *handler) (*webauthn.WebAuthn, error) {
|
|
|
+func newWebAuthn() (*webauthn.WebAuthn, error) {
|
|
|
url, err := url.Parse(config.Opts.BaseURL())
|
|
|
if err != nil {
|
|
|
return nil, err
|
|
|
@@ -70,7 +70,7 @@ func newWebAuthn(h *handler) (*webauthn.WebAuthn, error) {
|
|
|
}
|
|
|
|
|
|
func (h *handler) beginRegistration(w http.ResponseWriter, r *http.Request) {
|
|
|
- web, err := newWebAuthn(h)
|
|
|
+ web, err := newWebAuthn()
|
|
|
if err != nil {
|
|
|
json.ServerError(w, r, err)
|
|
|
return
|
|
|
@@ -117,7 +117,7 @@ func (h *handler) beginRegistration(w http.ResponseWriter, r *http.Request) {
|
|
|
}
|
|
|
|
|
|
func (h *handler) finishRegistration(w http.ResponseWriter, r *http.Request) {
|
|
|
- web, err := newWebAuthn(h)
|
|
|
+ web, err := newWebAuthn()
|
|
|
if err != nil {
|
|
|
json.ServerError(w, r, err)
|
|
|
return
|
|
|
@@ -152,7 +152,7 @@ func (h *handler) finishRegistration(w http.ResponseWriter, r *http.Request) {
|
|
|
}
|
|
|
|
|
|
func (h *handler) beginLogin(w http.ResponseWriter, r *http.Request) {
|
|
|
- web, err := newWebAuthn(h)
|
|
|
+ web, err := newWebAuthn()
|
|
|
if err != nil {
|
|
|
json.ServerError(w, r, err)
|
|
|
return
|
|
|
@@ -195,7 +195,7 @@ func (h *handler) beginLogin(w http.ResponseWriter, r *http.Request) {
|
|
|
}
|
|
|
|
|
|
func (h *handler) finishLogin(w http.ResponseWriter, r *http.Request) {
|
|
|
- web, err := newWebAuthn(h)
|
|
|
+ web, err := newWebAuthn()
|
|
|
if err != nil {
|
|
|
json.ServerError(w, r, err)
|
|
|
return
|