fix: use default redirect uri when not passed on end_session endpoint (#4054)

* fix: use default redirect uri when not passed on end_session endpoint

* instance state
This commit is contained in:
Livio Spring
2022-07-27 09:49:16 +02:00
committed by GitHub
parent 8e94d2377b
commit c15577c1f9
6 changed files with 25 additions and 11 deletions

View File

@@ -143,12 +143,12 @@ func (o *OPStorage) TerminateSession(ctx context.Context, userID, clientID strin
defer func() { span.EndWithError(err) }()
userAgentID, ok := middleware.UserAgentIDFromCtx(ctx)
if !ok {
logging.Log("OIDC-aGh4q").Error("no user agent id")
logging.Error("no user agent id")
return errors.ThrowPreconditionFailed(nil, "OIDC-fso7F", "no user agent id")
}
userIDs, err := o.repo.UserSessionUserIDsByAgentID(ctx, userAgentID)
if err != nil {
logging.Log("OIDC-Ghgr3").WithError(err).Error("error retrieving user sessions")
logging.WithError(err).Error("error retrieving user sessions")
return err
}
if len(userIDs) == 0 {
@@ -158,7 +158,7 @@ func (o *OPStorage) TerminateSession(ctx context.Context, userID, clientID strin
UserID: userID,
}
err = o.command.HumansSignOut(authz.SetCtxData(ctx, data), userAgentID, userIDs)
logging.Log("OIDC-Dggt2").OnError(err).Error("error signing out")
logging.OnError(err).Error("error signing out")
return err
}