Fix typo and also set default min user name length to 3 because jeff, jim, todd, mike
This commit is contained in:
1 parent
f84991c0f1
commit
5bf307797b
3 files changed
+5
-5
No files matched your search
@@ -37,7 +37,7 @@ func NewAuthMethod(scopeId string, opt ...Option) (*AuthMethod, error) {
|
||||
ScopeId: scopeId,
|
||||
Name: opts.withName,
|
||||
Description: opts.withDescription,
|
||||
MinUserNameLength: 5,
|
||||
MinUserNameLength: 3,
|
||||
MinPasswordLength: 8,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ func TestAuthMethod_New(t *testing.T) {
|
||||
args: args{},
|
||||
want: &AuthMethod{
|
||||
AuthMethod: &store.AuthMethod{
|
||||
MinUserNameLength: 5,
|
||||
MinUserNameLength: 3,
|
||||
MinPasswordLength: 8,
|
||||
},
|
||||
},
|
||||
@@ -47,7 +47,7 @@ func TestAuthMethod_New(t *testing.T) {
|
||||
want: &AuthMethod{
|
||||
AuthMethod: &store.AuthMethod{
|
||||
Name: "test-name",
|
||||
MinUserNameLength: 5,
|
||||
MinUserNameLength: 3,
|
||||
MinPasswordLength: 8,
|
||||
},
|
||||
},
|
||||
@@ -62,7 +62,7 @@ func TestAuthMethod_New(t *testing.T) {
|
||||
want: &AuthMethod{
|
||||
AuthMethod: &store.AuthMethod{
|
||||
Description: "test-description",
|
||||
MinUserNameLength: 5,
|
||||
MinUserNameLength: 3,
|
||||
MinPasswordLength: 8,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -5,7 +5,7 @@ import "errors"
|
||||
var (
|
||||
// ErrTooShort results from attempting to set a password which is to
|
||||
// short.
|
||||
ErrTooShort = errors.New("password to short")
|
||||
ErrTooShort = errors.New("too short")
|
||||
|
||||
// ErrUnsupportedConfiguration results from attempting to perform an
|
||||
// operation that sets a password configuration to an unsupported type.
|
||||
|
||||
Reference in new issue
Block a user