feat: complete registration invitation and auth redesign
This commit is contained in:
@@ -26,9 +26,9 @@ func TestAuthenticateScopesLoginByTenant(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
users.EXPECT().GetAuthUniqueRecord(types.TenantID(7), "basic", "alice").
|
||||
users.EXPECT().GetAuthByLogin(types.TenantID(7), "alice").
|
||||
Return(types.Uid(70), auth.LevelAuth, hash, time.Time{}, nil)
|
||||
users.EXPECT().GetAuthUniqueRecord(types.TenantID(8), "basic", "alice").
|
||||
users.EXPECT().GetAuthByLogin(types.TenantID(8), "alice").
|
||||
Return(types.Uid(80), auth.LevelAuth, hash, time.Time{}, nil)
|
||||
|
||||
a := &authenticator{name: "basic", minLoginLength: defaultMinLoginLength,
|
||||
@@ -73,7 +73,7 @@ func TestAddRecordAcceptsE164PhoneLogin(t *testing.T) {
|
||||
})
|
||||
|
||||
users.EXPECT().AddAuthRecord(types.TenantID(7), types.Uid(42), auth.LevelAuth,
|
||||
"basic", "+8615521120255", gomock.Any(), time.Time{}).Return(nil)
|
||||
gomock.Any(), time.Time{}).Return(nil)
|
||||
|
||||
a := &authenticator{name: "basic", addToTags: true, minLoginLength: defaultMinLoginLength,
|
||||
minPasswordLength: 6}
|
||||
|
||||
Reference in New Issue
Block a user