Merge pull request #11628 from tb365/bugfix/tb-keystone-user-not-found-fix

fix(keystone): user not found error fix
This commit is contained in:
yunion-ci-robot
2021-07-12 13:58:01 +08:00
committed by GitHub
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",
},
}