mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 11:04:25 +00:00
320ddfa46d
* feat: add/ remove external idps * feat: external idp add /remove * fix: auth proto * fix: handle login * feat: loginpolicy on authrequest * feat: idp providers on login * feat: link external idp * fix: check login policy on check username * feat: add mapping fields for idp config * feat: use user org id if existing * feat: use user org id if existing * feat: register external user * feat: register external user * feat: user linking * feat: user linking * feat: design external login * feat: design external login * fix: tests * fix: regenerate login design * feat: next step test linking process * feat: next step test linking process * feat: cascade remove external idps on user * fix: tests * fix: tests * feat: external idp requsts on users * fix: generate protos * feat: login styles * feat: login styles * fix: link user * fix: register user on specifig org * fix: user linking * fix: register external, linking auto * fix: remove unnecessary request from proto * fix: tests * fix: new oidc package * fix: migration version * fix: policy permissions * Update internal/ui/login/static/i18n/en.yaml Co-authored-by: Livio Amstutz <livio.a@gmail.com> * Update internal/ui/login/static/i18n/en.yaml Co-authored-by: Livio Amstutz <livio.a@gmail.com> * Update internal/ui/login/handler/renderer.go Co-authored-by: Livio Amstutz <livio.a@gmail.com> * Update internal/ui/login/handler/renderer.go Co-authored-by: Livio Amstutz <livio.a@gmail.com> * fix: pr requests * Update internal/ui/login/handler/link_users_handler.go Co-authored-by: Livio Amstutz <livio.a@gmail.com> * fix: pr requests * fix: pr requests * fix: pr requests * fix: login name size * fix: profile image light * fix: colors * fix: pr requests * fix: remove redirect uri validator * fix: remove redirect uri validator Co-authored-by: Livio Amstutz <livio.a@gmail.com>
75 lines
3.0 KiB
Go
75 lines
3.0 KiB
Go
package repository
|
|
|
|
import (
|
|
"context"
|
|
|
|
org_model "github.com/caos/zitadel/internal/org/model"
|
|
|
|
"github.com/caos/zitadel/internal/user/model"
|
|
)
|
|
|
|
type UserRepository interface {
|
|
Register(ctx context.Context, user *model.User, member *org_model.OrgMember, resourceOwner string) (*model.User, error)
|
|
RegisterExternalUser(ctx context.Context, user *model.User, externalIDP *model.ExternalIDP, member *org_model.OrgMember, resourceOwner string) (*model.User, error)
|
|
|
|
myUserRepo
|
|
SkipMfaInit(ctx context.Context, userID string) error
|
|
|
|
RequestPasswordReset(ctx context.Context, username string) error
|
|
SetPassword(ctx context.Context, userID, code, password string) error
|
|
ChangePassword(ctx context.Context, userID, old, new string) error
|
|
|
|
VerifyEmail(ctx context.Context, userID, code string) error
|
|
ResendEmailVerificationMail(ctx context.Context, userID string) error
|
|
|
|
VerifyInitCode(ctx context.Context, userID, code, password string) error
|
|
ResendInitVerificationMail(ctx context.Context, userID string) error
|
|
|
|
AddMfaOTP(ctx context.Context, userID string) (*model.OTP, error)
|
|
VerifyMfaOTPSetup(ctx context.Context, userID, code string) error
|
|
|
|
ChangeUsername(ctx context.Context, userID, username string) error
|
|
|
|
SignOut(ctx context.Context, agentID string) error
|
|
|
|
UserByID(ctx context.Context, userID string) (*model.UserView, error)
|
|
|
|
MachineKeyByID(ctx context.Context, keyID string) (*model.MachineKeyView, error)
|
|
}
|
|
|
|
type myUserRepo interface {
|
|
MyUser(ctx context.Context) (*model.UserView, error)
|
|
|
|
MyProfile(ctx context.Context) (*model.Profile, error)
|
|
ChangeMyProfile(ctx context.Context, profile *model.Profile) (*model.Profile, error)
|
|
|
|
MyEmail(ctx context.Context) (*model.Email, error)
|
|
ChangeMyEmail(ctx context.Context, email *model.Email) (*model.Email, error)
|
|
VerifyMyEmail(ctx context.Context, code string) error
|
|
ResendMyEmailVerificationMail(ctx context.Context) error
|
|
|
|
MyPhone(ctx context.Context) (*model.Phone, error)
|
|
ChangeMyPhone(ctx context.Context, phone *model.Phone) (*model.Phone, error)
|
|
RemoveMyPhone(ctx context.Context) error
|
|
VerifyMyPhone(ctx context.Context, code string) error
|
|
ResendMyPhoneVerificationCode(ctx context.Context) error
|
|
|
|
MyAddress(ctx context.Context) (*model.Address, error)
|
|
ChangeMyAddress(ctx context.Context, address *model.Address) (*model.Address, error)
|
|
|
|
ChangeMyPassword(ctx context.Context, old, new string) error
|
|
|
|
SearchMyExternalIDPs(ctx context.Context, request *model.ExternalIDPSearchRequest) (*model.ExternalIDPSearchResponse, error)
|
|
AddMyExternalIDP(ctx context.Context, externalIDP *model.ExternalIDP) (*model.ExternalIDP, error)
|
|
RemoveMyExternalIDP(ctx context.Context, externalIDP *model.ExternalIDP) error
|
|
|
|
MyUserMfas(ctx context.Context) ([]*model.MultiFactor, error)
|
|
AddMyMfaOTP(ctx context.Context) (*model.OTP, error)
|
|
VerifyMyMfaOTPSetup(ctx context.Context, code string) error
|
|
RemoveMyMfaOTP(ctx context.Context) error
|
|
|
|
ChangeMyUsername(ctx context.Context, username string) error
|
|
|
|
MyUserChanges(ctx context.Context, lastSequence uint64, limit uint64, sortAscending bool) (*model.UserChanges, error)
|
|
}
|