mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-02 19:40:19 +08:00
feat: add OIDC feature support. (#373)
1. add nonce parameter. 2. add sub in userinfo endpoint. Signed-off-by: 0x2a <stevesough@gmail.com>
This commit is contained in:
@ -61,6 +61,7 @@ type RequestForm struct {
|
||||
type Response struct {
|
||||
Status string `json:"status"`
|
||||
Msg string `json:"msg"`
|
||||
Sub string `json:"sub"`
|
||||
Data interface{} `json:"data"`
|
||||
Data2 interface{} `json:"data2"`
|
||||
}
|
||||
@ -217,8 +218,14 @@ func (c *ApiController) GetAccount() {
|
||||
}
|
||||
|
||||
organization := object.GetMaskedOrganization(object.GetOrganizationByUser(user))
|
||||
|
||||
c.ResponseOk(user, organization)
|
||||
resp := Response{
|
||||
Status: "ok",
|
||||
Sub: userId,
|
||||
Data: user,
|
||||
Data2: organization,
|
||||
}
|
||||
c.Data["json"] = resp
|
||||
c.ServeJSON()
|
||||
}
|
||||
|
||||
// GetHumanCheck ...
|
||||
|
Reference in New Issue
Block a user