Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrEmptyUsername = errors.New("oidc: username is empty")
)
Functions ¶
func NewGoogleProvider ¶ added in v2.0.48
func NewGoogleProvider(clientID, clientSecret, redirectURL string) *googleProvider
Types ¶
type Authorization ¶ added in v2.0.48
type Authorization struct {
// contains filtered or unexported fields
}
func GenerateAuthorization ¶ added in v2.0.48
func GenerateAuthorization(config *oauth2.Config) *Authorization
func (*Authorization) CodeVerifier ¶ added in v2.0.48
func (u *Authorization) CodeVerifier() string
func (*Authorization) RedirectURL ¶ added in v2.0.48
func (u *Authorization) RedirectURL() string
func (*Authorization) State ¶ added in v2.0.48
func (u *Authorization) State() string
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func (*Manager) AddProvider ¶
type Provider ¶
type Provider interface { GetConfig() *oauth2.Config GetUserExtraKey() string GetProfile(ctx context.Context, code, codeVerifier string) (*Profile, error) PopulateUserCreationWithProfileID(user *model.UserCreationRequest, profile *Profile) PopulateUserWithProfileID(user *model.User, profile *Profile) UnsetUserProfileID(user *model.User) }
Provider is an interface for OAuth2 providers.
Click to show internal directories.
Click to hide internal directories.