Generate real access token.

This commit is contained in:
Yang Luo
2021-03-14 22:48:09 +08:00
parent 1fd6ee388c
commit f014554415
8 changed files with 115 additions and 10 deletions

View File

@ -70,13 +70,14 @@ func (c *ApiController) DeleteToken() {
}
func (c *ApiController) GetOAuthCode() {
userId := c.GetSessionUser()
clientId := c.Input().Get("client_id")
responseType := c.Input().Get("response_type")
redirectUri := c.Input().Get("redirect_uri")
scope := c.Input().Get("scope")
state := c.Input().Get("state")
c.Data["json"] = object.GetOAuthCode(clientId, responseType, redirectUri, scope, state)
c.Data["json"] = object.GetOAuthCode(userId, clientId, responseType, redirectUri, scope, state)
c.ServeJSON()
}