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