mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 02:35:49 +08:00
Rename to authState, useProxy, delete EnableDocs.
This commit is contained in:
parent
aa706019f2
commit
5a3abdbc95
@ -6,9 +6,8 @@ copyrequestbody = true
|
||||
driverName = mysql
|
||||
dataSourceName = root:123@tcp(localhost:3306)/
|
||||
dbName = casdoor
|
||||
AuthState = "casdoor"
|
||||
UseProxy = false
|
||||
EnableDocs = true
|
||||
authState = "casdoor"
|
||||
useProxy = false
|
||||
mailUser = ""
|
||||
mailPass = ""
|
||||
mailHost = ""
|
||||
|
@ -190,7 +190,7 @@ func (c *ApiController) UploadAvatar() {
|
||||
}
|
||||
|
||||
dist, _ := base64.StdEncoding.DecodeString(avatarBase64[index+1:])
|
||||
msg := object.UploadAvatar(user.Owner + "/" + user.Name, dist)
|
||||
msg := object.UploadAvatar(user.GetId(), dist)
|
||||
if msg != "" {
|
||||
resp = Response{Status: "error", Msg: msg}
|
||||
c.Data["json"] = resp
|
||||
|
@ -121,8 +121,8 @@ func (c *ApiController) Login() {
|
||||
idProvider := idp.GetIdProvider(provider.Type, provider.ClientId, provider.ClientSecret, form.RedirectUri)
|
||||
idProvider.SetHttpClient(httpClient)
|
||||
|
||||
if form.State != beego.AppConfig.String("AuthState") && form.State != application.Name {
|
||||
resp = &Response{Status: "error", Msg: fmt.Sprintf("state expected: \"%s\", but got: \"%s\"", beego.AppConfig.String("AuthState"), form.State)}
|
||||
if form.State != beego.AppConfig.String("authState") && form.State != application.Name {
|
||||
resp = &Response{Status: "error", Msg: fmt.Sprintf("state expected: \"%s\", but got: \"%s\"", beego.AppConfig.String("authState"), form.State)}
|
||||
c.Data["json"] = resp
|
||||
c.ServeJSON()
|
||||
return
|
||||
|
@ -24,7 +24,7 @@ import (
|
||||
var httpClient *http.Client
|
||||
|
||||
func InitHttpClient() {
|
||||
useProxy, err := beego.AppConfig.Bool("UseProxy")
|
||||
useProxy, err := beego.AppConfig.Bool("useProxy")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user