diff --git a/internal/auth/password/authmethod.go b/internal/auth/password/authmethod.go index 13a2819931..97aa00c089 100644 --- a/internal/auth/password/authmethod.go +++ b/internal/auth/password/authmethod.go @@ -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, }, } diff --git a/internal/auth/password/authmethod_test.go b/internal/auth/password/authmethod_test.go index 7612f0240f..863526e7ba 100644 --- a/internal/auth/password/authmethod_test.go +++ b/internal/auth/password/authmethod_test.go @@ -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, }, }, diff --git a/internal/auth/password/errors.go b/internal/auth/password/errors.go index fae2738681..b98e8a4121 100644 --- a/internal/auth/password/errors.go +++ b/internal/auth/password/errors.go @@ -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.