2020-03-07 14:06:57 +03:00
|
|
|
package basic
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/micro/go-micro/v2/auth/provider"
|
|
|
|
)
|
|
|
|
|
|
|
|
// NewProvider returns an initialised basic provider
|
|
|
|
func NewProvider(opts ...provider.Option) provider.Provider {
|
|
|
|
var options provider.Options
|
|
|
|
for _, o := range opts {
|
|
|
|
o(&options)
|
|
|
|
}
|
|
|
|
return &basic{options}
|
|
|
|
}
|
|
|
|
|
|
|
|
type basic struct {
|
|
|
|
opts provider.Options
|
|
|
|
}
|
|
|
|
|
|
|
|
func (b *basic) String() string {
|
|
|
|
return "basic"
|
|
|
|
}
|
|
|
|
|
|
|
|
func (b *basic) Options() provider.Options {
|
|
|
|
return b.opts
|
|
|
|
}
|
|
|
|
|
2020-04-01 17:36:22 +03:00
|
|
|
func (b *basic) Endpoint(...provider.EndpointOption) string {
|
2020-03-07 14:06:57 +03:00
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (b *basic) Redirect() string {
|
|
|
|
return ""
|
|
|
|
}
|