mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 12:30:19 +08:00
Generate real access token.
This commit is contained in:
@ -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()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user