fix(keystone): user not found error fix

This commit is contained in:
tb365
2021-07-12 13:54:22 +08:00
parent aa87a342a7
commit 285b0f2523
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -116,7 +116,7 @@ func (h *AuthHandlers) getIdpSsoRedirectUri(ctx context.Context, w http.Response
}
func findExtUserId(input string) string {
pattern := regexp.MustCompile(`idp.SyncOrCreateDomainAndUser: ([^:]+): UserNotFoundError`)
pattern := regexp.MustCompile(`idp.SyncOrCreateDomainAndUser: ([^:]+): UserNotFound`)
matches := pattern.FindAllStringSubmatch(input, -1)
log.Debugf("%#v", matches)
if len(matches) > 0 && len(matches[0]) > 1 {
+1 -1
View File
@@ -22,7 +22,7 @@ func TestFindExtUserId(t *testing.T) {
want string
}{
{
in: "authUserByCASV3: Authenticate: idp.SyncOrCreateDomainAndUser: qiujian: UserNotFoundError",
in: "authUserByCASV3: Authenticate: idp.SyncOrCreateDomainAndUser: qiujian: UserNotFound",
want: "qiujian",
},
}