Fix typo and also set default min user name length to 3 because jeff, jim, todd, mike

This commit is contained in:
Jeff Mitchell committed 2020-08-07 13:38:44 -04:00
1 parent f84991c0f1
commit 5bf307797b
3 files changed
+5 -5

No files matched your search

+1 -1
View File
@@ -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,
},
}
+3 -3
View File
@@ -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,
},
},
+1 -1
View File
@@ -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.