Documentation
¶
Index ¶
- Variables
- func BindVerifiedIdentity(ctx context.Context, source *auth.Source, user *user_model.User, ...) error
- func EnsureLinkExternalToUser(ctx context.Context, authSourceID int64, user *user_model.User, ...) error
- func LinkAccountToUser(ctx context.Context, authSourceID int64, user *user_model.User, ...) error
- func NativeIdentitySource(source *auth.Source) bool
- func SyncGoogleEmail(ctx context.Context, source *auth.Source, user *user_model.User, ...) error
- func UnlinkIdentitySource(ctx context.Context, user *user_model.User, sourceID int64) (int64, error)
- func UpdateMigrationsByType(ctx context.Context, tp structs.GitServiceType, externalUserID string, ...) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func BindVerifiedIdentity ¶ added in v1.11.0
func BindVerifiedIdentity(ctx context.Context, source *auth.Source, user *user_model.User, identity goth.User, replace bool) error
BindVerifiedIdentity replaces only this provider after its new identity was authenticated.
func EnsureLinkExternalToUser ¶
func EnsureLinkExternalToUser(ctx context.Context, authSourceID int64, user *user_model.User, gothUser goth.User) error
EnsureLinkExternalToUser link the gothUser to the user
func LinkAccountToUser ¶
func LinkAccountToUser(ctx context.Context, authSourceID int64, user *user_model.User, gothUser goth.User) error
LinkAccountToUser link the gothUser to the user
func NativeIdentitySource ¶ added in v1.11.0
func SyncGoogleEmail ¶ added in v1.11.0
func SyncGoogleEmail(ctx context.Context, source *auth.Source, user *user_model.User, identity goth.User) error
SyncGoogleEmail adds an independently verified alias; the user's primary address stays their choice.
func UnlinkIdentitySource ¶ added in v1.11.0
func UnlinkIdentitySource(ctx context.Context, user *user_model.User, sourceID int64) (int64, error)
UnlinkIdentitySource retains a usable login method and removes a legacy primary OAuth identity too.
func UpdateMigrationsByType ¶
func UpdateMigrationsByType(ctx context.Context, tp structs.GitServiceType, externalUserID string, userID int64) error
UpdateMigrationsByType updates all migrated repositories' posterid from gitServiceType to replace originalAuthorID to posterID
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.