Пример #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
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),
	}
}