forked from mindoc-org/mindoc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request mindoc-org#790 from gsw945/master
添加企业微信登录支持
- Loading branch information
Showing
17 changed files
with
1,199 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ _cgo_export.* | |
_testmain.go | ||
|
||
*.exe | ||
*.exe~ | ||
mindoc | ||
database | ||
*.test | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ dist: focal | |
|
||
language: go | ||
go: | ||
- "1.13" | ||
- "1.18.1" | ||
|
||
arch: | ||
- amd64 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package conf | ||
|
||
import ( | ||
"github.com/beego/beego/v2/server/web" | ||
) | ||
|
||
type WorkWeixinConf struct { | ||
CorpId string // 企业ID | ||
AgentId string // 应用ID | ||
Secret string // 应用密钥 | ||
ContactSecret string // 通讯录密钥 | ||
} | ||
|
||
func GetWorkWeixinConfig() *WorkWeixinConf { | ||
corpid, _ := web.AppConfig.String("workweixin_corpid") | ||
agentid, _ := web.AppConfig.String("workweixin_agentid") | ||
secret, _ := web.AppConfig.String("workweixin_secret") | ||
contact_secret, _ := web.AppConfig.String("workweixin_contact_secret") | ||
|
||
c := &WorkWeixinConf{ | ||
CorpId: corpid, | ||
AgentId: agentid, | ||
Secret: secret, | ||
ContactSecret: contact_secret, | ||
} | ||
return c | ||
} |
Oops, something went wrong.