예제 #1
0
func newPlatform(opts ...Option) Auth {
	var options Options
	for _, o := range opts {
		o(&options)
	}
	if options.Client == nil {
		options.Client = client.DefaultClient
	}

	return &platform{
		opts: options,
		c:    oauth2.NewOauth2Client("go.micro.srv.auth", options.Client),
	}
}
예제 #2
0
파일: os.go 프로젝트: micro/go-platform
func newOS(opts ...Option) Auth {
	var options Options
	for _, o := range opts {
		o(&options)
	}
	if options.Client == nil {
		options.Client = client.DefaultClient
	}

	return &os{
		exit: make(chan bool),
		opts: options,
		c:    oauth2.NewOauth2Client("go.micro.srv.auth", options.Client),
	}
}