Refactor out application.IsRedirectUriValid()

This commit is contained in:
Gucheng Wang
2022-12-21 00:35:33 +08:00
parent 65d4946042
commit f075d0fd74
5 changed files with 18 additions and 53 deletions

View File

@ -261,7 +261,7 @@ func (c *ApiController) TokenLogout() {
flag, application := object.DeleteTokenByAccessToken(token)
redirectUri := c.Input().Get("post_logout_redirect_uri")
state := c.Input().Get("state")
if application != nil && object.CheckRedirectUriValid(application, redirectUri) {
if application != nil && application.IsRedirectUriValid(redirectUri) {
c.Ctx.Redirect(http.StatusFound, redirectUri+"?state="+state)
return
}