Refactor auth: add token and store implementations (#1230)

* Refactor auth: add token and memory implementations

* Fix typo

* Remove memory auth (implemented already by the store implementation), revert default to noop

* Add grpc header

* Global Config

* config/global => util/config

* Rename package to remove confict

* Tweak

* Improve Error Handling
This commit is contained in:
ben-toogood
2020-02-24 15:07:27 +00:00
committed by GitHub
parent 56f8115ea8
commit ffdf986aac
6 changed files with 251 additions and 30 deletions

View File

@@ -65,6 +65,7 @@ import (
// auth
jwtAuth "github.com/micro/go-micro/v2/auth/jwt"
sAuth "github.com/micro/go-micro/v2/auth/service"
storeAuth "github.com/micro/go-micro/v2/auth/store"
)
type Cmd interface {
@@ -314,6 +315,7 @@ var (
DefaultAuths = map[string]func(...auth.Option) auth.Auth{
"service": sAuth.NewAuth,
"store": storeAuth.NewAuth,
"jwt": jwtAuth.NewAuth,
}
)