2023-06-19 23:42:47 +02:00
|
|
|
// SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
2017-11-23 07:22:33 +01:00
|
|
|
|
2018-08-25 06:51:50 +02:00
|
|
|
package oauth2 // import "miniflux.app/oauth2"
|
2020-12-22 06:14:10 +01:00
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
|
|
|
"miniflux.app/model"
|
|
|
|
)
|
2017-11-23 07:22:33 +01:00
|
|
|
|
|
|
|
// Provider is an interface for OAuth2 providers.
|
|
|
|
type Provider interface {
|
2017-11-25 01:09:10 +01:00
|
|
|
GetUserExtraKey() string
|
2017-11-23 07:22:33 +01:00
|
|
|
GetRedirectURL(state string) string
|
2020-03-08 03:45:19 +01:00
|
|
|
GetProfile(ctx context.Context, code string) (*Profile, error)
|
2021-01-04 06:20:21 +01:00
|
|
|
PopulateUserCreationWithProfileID(user *model.UserCreationRequest, profile *Profile)
|
2020-12-22 06:14:10 +01:00
|
|
|
PopulateUserWithProfileID(user *model.User, profile *Profile)
|
|
|
|
UnsetUserProfileID(user *model.User)
|
2017-11-23 07:22:33 +01:00
|
|
|
}
|