You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
synctv/internal/provider/provider.go

34 lines
532 B
Go

2 years ago
package provider
import (
"context"
)
type OAuth2Provider = string
2 years ago
type UserInfo struct {
Username string
ProviderUserID string
2 years ago
}
type Oauth2Option struct {
ClientID string
ClientSecret string
RedirectURL string
}
type Provider interface {
Init(Oauth2Option)
2 years ago
Provider() OAuth2Provider
}
type ProviderRegistSetting interface {
RegistSetting(group string)
}
10 months ago
type Interface interface {
Provider
NewAuthURL(context.Context, string) (string, error)
GetUserInfo(context.Context, string) (*UserInfo, error)
2 years ago
}