File tree Expand file tree Collapse file tree 3 files changed +3
-1
lines changed Expand file tree Collapse file tree 3 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ func run() error {
33
33
if err != nil {
34
34
return errors .New (fmt .Sprintf ("unable to listen to the port: %v" , err ))
35
35
}
36
- tokenSvc := token .NewService (([]byte )("5555" ), 3600 )
36
+ tokenSvc := token .NewService (([]byte )(config . Secret ), 3600 )
37
37
authInterceptor := interceptor .NewAuthInterceptor (tokenSvc )
38
38
server := grpc .NewServer (grpc .UnaryInterceptor (authInterceptor .Unary ()))
39
39
ctx := context .Background ()
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import "github.com/spf13/viper"
5
5
type GrpcConfig struct {
6
6
Port int `mapstructure:"port"`
7
7
DbConnectionString string `mapstructure:"connection"`
8
+ Secret string `mapstructure:"secret"`
8
9
}
9
10
10
11
type ProxyConfig struct {
Original file line number Diff line number Diff line change 1
1
port = 8181
2
2
connection = " postgres://postgres:123456@localhost:5432/paotooong?sslmode=disable"
3
+ secret = " "
You can’t perform that action at this time.
0 commit comments