feat 网关鉴权
This commit is contained in:
@@ -16,6 +16,10 @@ monitor:
|
||||
db:
|
||||
etcd:
|
||||
endpoints: [ "10.0.40.9:2379" ]
|
||||
redis:
|
||||
addr: "47.108.184.184:6379"
|
||||
password: "lQ7aM8oB6lK0iD5k"
|
||||
db: 0
|
||||
|
||||
serve:
|
||||
grpc:
|
||||
@@ -32,3 +36,7 @@ serve:
|
||||
http:
|
||||
address: "0.0.0.0"
|
||||
port: 8503
|
||||
|
||||
auth:
|
||||
secret: "bMa3mU4oCsX2KBex5o7GzwSnACpumFq3SdlDXYZgVTU="
|
||||
expire: 259200
|
||||
|
||||
@@ -3,6 +3,8 @@ package config
|
||||
import "common/config"
|
||||
|
||||
const path = "./config"
|
||||
const KeyUserAccessToken = "user:access:%v"
|
||||
const KeyUserRefreshToken = "user:refresh:%v"
|
||||
|
||||
type Config struct {
|
||||
App *config.AppConfig `yaml:"app"`
|
||||
@@ -10,6 +12,10 @@ type Config struct {
|
||||
Monitor *config.MonitorConfig `yaml:"monitor"`
|
||||
DB *config.DBConfig `yaml:"db"`
|
||||
Serve *config.ServeConfig `yaml:"serve"`
|
||||
Auth *struct {
|
||||
Secret string `yaml:"secret"`
|
||||
Expire int64 `yaml:"expire"`
|
||||
}
|
||||
}
|
||||
|
||||
var cfg *Config
|
||||
|
||||
@@ -16,6 +16,10 @@ monitor:
|
||||
db:
|
||||
etcd:
|
||||
endpoints: [ "172.18.28.0:2379" ]
|
||||
redis:
|
||||
addr: "172.18.28.0:6379"
|
||||
password: "lQ7aM8oB6lK0iD5k"
|
||||
db: 0
|
||||
|
||||
serve:
|
||||
grpc:
|
||||
@@ -32,3 +36,7 @@ serve:
|
||||
http:
|
||||
address: "0.0.0.0"
|
||||
port: 8503
|
||||
|
||||
auth:
|
||||
secret: "bMa3mU4oCsX2KBex5o7GzwSnACpumFq3SdlDXYZgVTU="
|
||||
expire: 259200
|
||||
Reference in New Issue
Block a user