auth.go 807 字节
Newer Older
E
eoLinker API Management 已提交
1 2 3
package auth

import (
Y
Your Name 已提交
4
	console_sqlite3 "github.com/eolinker/goku-api-gateway/server/dao/console-sqlite3"
E
eoLinker API Management 已提交
5 6
)

Y
Your Name 已提交
7
//GetAuthStatus 获取认证状态
E
eoLinker API Management 已提交
8
func GetAuthStatus(strategyID string) (bool, map[string]interface{}, error) {
Y
Your Name 已提交
9
	return console_sqlite3.GetAuthStatus(strategyID)
E
eoLinker API Management 已提交
10 11
}

Y
Your Name 已提交
12
//GetAuthInfo 获取认证信息
E
eoLinker API Management 已提交
13
func GetAuthInfo(strategyID string) (bool, map[string]interface{}, error) {
Y
Your Name 已提交
14
	return console_sqlite3.GetAuthInfo(strategyID)
E
eoLinker API Management 已提交
15 16
}

Y
Your Name 已提交
17
//EditAuthInfo 编辑认证信息
E
eoLinker API Management 已提交
18
func EditAuthInfo(strategyID, strategyName, basicAuthList, apikeyList, jwtCredentialList, oauth2CredentialList string, delClientIDList []string) (bool, error) {
Y
Your Name 已提交
19
	flag, err := console_sqlite3.EditAuthInfo(strategyID, strategyName, basicAuthList, apikeyList,
E
eoLinker API Management 已提交
20
		jwtCredentialList, oauth2CredentialList, delClientIDList)
Y
Your Name 已提交
21

E
eoLinker API Management 已提交
22 23
	return flag, err
}