diff --git a/oauth2/manager.go b/oauth2/manager.go new file mode 100644 index 0000000..8a9dc4c --- /dev/null +++ b/oauth2/manager.go @@ -0,0 +1,25 @@ +package oauth2 + +import () + +// Oauth provider configuration +type Provider interface { + // The oauth authentication url to redirect to + AuthURL() string + + // The url for token exchange + TokenURL() string +} +type Manager struct { + configs map[string]map[string]string +} + +func NewManager() *Manager { + return &Manager{ + configs: map[string]map[string]string{}, + } +} + +func (oauth *Manager) AddConfig(opts map[string]string) error { + return nil +} diff --git a/oauth2/manager_test.go b/oauth2/manager_test.go new file mode 100644 index 0000000..0fa2999 --- /dev/null +++ b/oauth2/manager_test.go @@ -0,0 +1,12 @@ +package oauth2 + +import ( + "github.com/stretchr/testify/assert" + "testing" +) + +func Test_Manager(t *testing.T) { + m := NewManager() + m.AddConfig(nil) + assert.Equal(t, true, true) +}