test: hibp api changes
This commit is contained in:
parent
ed71cda319
commit
d169aaf137
|
@ -46,10 +46,13 @@ func newMembersHandler(devMode bool, r *render.Renderer, urlTo web.URLMaker, fh
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Init the have-i-been-pwned client for insecure password checks.
|
// Init the have-i-been-pwned client for insecure password checks.
|
||||||
const storeExpiry = 1 * time.Hour
|
httpClient := http.DefaultClient
|
||||||
hibpClient := hibp.NewClient(storeExpiry)
|
httpClient.Timeout = 1 * time.Hour
|
||||||
|
|
||||||
mh.leakedLookup = hibpClient.Pwned.Compromised
|
hibpClient := hibp.NewClient()
|
||||||
|
hibpClient.SetHTTPClient(httpClient)
|
||||||
|
|
||||||
|
mh.leakedLookup = hibpClient.Compromised
|
||||||
}
|
}
|
||||||
|
|
||||||
return mh
|
return mh
|
||||||
|
|
Loading…
Reference in New Issue