1
0
mirror of https://github.com/volatiletech/authboss.git synced 2025-11-23 22:14:49 +02:00

password hashing via hasher (defaults: bcrypt)

This commit is contained in:
Evghenii Maslennikov
2022-04-18 23:42:02 +03:00
committed by Stephen Afam-Osemene
parent ccfe4d1c31
commit 42f90e2471
13 changed files with 83 additions and 8 deletions

View File

@@ -6,6 +6,7 @@ import (
"crypto/sha512"
"encoding/base64"
"errors"
"github.com/volatiletech/authboss/v3/defaults"
"net/http"
"net/http/httptest"
"testing"
@@ -71,6 +72,7 @@ func testSetup() *testHarness {
harness.ab.Config.Core.BodyReader = harness.bodyReader
harness.ab.Config.Core.Logger = mocks.Logger{}
harness.ab.Config.Core.Hasher = defaults.NewBCryptHasher(harness.ab.Modules.BCryptCost)
harness.ab.Config.Core.Mailer = harness.mailer
harness.ab.Config.Core.Redirector = harness.redirector
harness.ab.Config.Core.MailRenderer = harness.renderer