mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-22 18:25:47 +08:00
feat: return HTTP status 400 instead of 200 in GetOAuthToken() (#3807)
This commit is contained in:
parent
086859d1ce
commit
1173f75794
@ -229,6 +229,7 @@ func (c *ApiController) GetOAuthToken() {
|
||||
ErrorDescription: "token is expired",
|
||||
}
|
||||
c.ServeJSON()
|
||||
c.SetTokenErrorHttpStatus()
|
||||
return
|
||||
}
|
||||
|
||||
@ -239,6 +240,7 @@ func (c *ApiController) GetOAuthToken() {
|
||||
ErrorDescription: "authorization pending",
|
||||
}
|
||||
c.ServeJSON()
|
||||
c.SetTokenErrorHttpStatus()
|
||||
return
|
||||
}
|
||||
|
||||
@ -248,6 +250,7 @@ func (c *ApiController) GetOAuthToken() {
|
||||
ErrorDescription: "token is expired",
|
||||
}
|
||||
c.ServeJSON()
|
||||
c.SetTokenErrorHttpStatus()
|
||||
return
|
||||
}
|
||||
object.DeviceAuthMap.Delete(deviceCode)
|
||||
|
Loading…
x
Reference in New Issue
Block a user