Service => Service Auth
This commit is contained in:
@@ -18,7 +18,6 @@ import (
|
||||
"github.com/micro/go-micro/v2/plugin"
|
||||
"github.com/micro/go-micro/v2/server"
|
||||
"github.com/micro/go-micro/v2/store"
|
||||
"github.com/micro/go-micro/v2/util/config"
|
||||
"github.com/micro/go-micro/v2/util/wrapper"
|
||||
)
|
||||
|
||||
@@ -117,9 +116,9 @@ func (s *service) Init(opts ...Option) {
|
||||
// Right now we're just going to load a token
|
||||
// May need to re-read value on change
|
||||
// TODO: should be scoped to micro/auth/token
|
||||
if tk, _ := config.Get("token"); len(tk) > 0 {
|
||||
s.opts.Auth.Init(auth.ServiceToken(tk))
|
||||
}
|
||||
// if tk, _ := config.Get("token"); len(tk) > 0 {
|
||||
// s.opts.Auth.Init(auth.ServiceToken(tk))
|
||||
// }
|
||||
})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user