mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-19 10:46:58 +08:00
fix(keystone): user not found error fix
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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",
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user