2020-05-18 10:06:36 +00:00
|
|
|
package repository
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
2021-09-27 11:43:49 +00:00
|
|
|
|
2022-04-26 23:01:45 +00:00
|
|
|
"github.com/zitadel/zitadel/internal/domain"
|
2020-05-18 10:06:36 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type AuthRequestRepository interface {
|
2021-02-08 10:30:30 +00:00
|
|
|
CreateAuthRequest(ctx context.Context, request *domain.AuthRequest) (*domain.AuthRequest, error)
|
2022-04-05 05:58:09 +00:00
|
|
|
AuthRequestByID(ctx context.Context, id, userAgentID string) (*domain.AuthRequest, error)
|
|
|
|
AuthRequestByIDCheckLoggedIn(ctx context.Context, id, userAgentID string) (*domain.AuthRequest, error)
|
|
|
|
AuthRequestByCode(ctx context.Context, code string) (*domain.AuthRequest, error)
|
|
|
|
SaveAuthCode(ctx context.Context, id, code, userAgentID string) error
|
|
|
|
DeleteAuthRequest(ctx context.Context, id string) error
|
2020-12-02 16:00:04 +00:00
|
|
|
|
2022-04-05 05:58:09 +00:00
|
|
|
CheckLoginName(ctx context.Context, id, loginName, userAgentID string) error
|
|
|
|
CheckExternalUserLogin(ctx context.Context, authReqID, userAgentID string, user *domain.ExternalUser, info *domain.BrowserInfo) error
|
|
|
|
SetExternalUserLogin(ctx context.Context, authReqID, userAgentID string, user *domain.ExternalUser) error
|
2023-06-15 07:02:53 +00:00
|
|
|
SetLinkingUser(ctx context.Context, request *domain.AuthRequest, externalUser *domain.ExternalUser) error
|
2022-04-05 05:58:09 +00:00
|
|
|
SelectUser(ctx context.Context, id, userID, userAgentID string) error
|
|
|
|
SelectExternalIDP(ctx context.Context, authReqID, idpConfigID, userAgentID string) error
|
|
|
|
VerifyPassword(ctx context.Context, id, userID, resourceOwner, password, userAgentID string, info *domain.BrowserInfo) error
|
2020-12-02 16:00:04 +00:00
|
|
|
|
2022-04-05 05:58:09 +00:00
|
|
|
VerifyMFAOTP(ctx context.Context, authRequestID, userID, resourceOwner, code, userAgentID string, info *domain.BrowserInfo) error
|
|
|
|
BeginMFAU2FLogin(ctx context.Context, userID, resourceOwner, authRequestID, userAgentID string) (*domain.WebAuthNLogin, error)
|
|
|
|
VerifyMFAU2F(ctx context.Context, userID, resourceOwner, authRequestID, userAgentID string, credentialData []byte, info *domain.BrowserInfo) error
|
2021-10-04 14:19:21 +00:00
|
|
|
BeginPasswordlessSetup(ctx context.Context, userID, resourceOwner string, preferredPlatformType domain.AuthenticatorAttachment) (login *domain.WebAuthNToken, err error)
|
2021-08-02 13:24:58 +00:00
|
|
|
VerifyPasswordlessSetup(ctx context.Context, userID, resourceOwner, userAgentID, tokenName string, credentialData []byte) (err error)
|
2021-10-04 14:19:21 +00:00
|
|
|
BeginPasswordlessInitCodeSetup(ctx context.Context, userID, resourceOwner, codeID, verificationCode string, preferredPlatformType domain.AuthenticatorAttachment) (login *domain.WebAuthNToken, err error)
|
2021-08-02 13:24:58 +00:00
|
|
|
VerifyPasswordlessInitCodeSetup(ctx context.Context, userID, resourceOwner, userAgentID, tokenName, codeID, verificationCode string, credentialData []byte) (err error)
|
2022-04-05 05:58:09 +00:00
|
|
|
BeginPasswordlessLogin(ctx context.Context, userID, resourceOwner, authRequestID, userAgentID string) (*domain.WebAuthNLogin, error)
|
|
|
|
VerifyPasswordless(ctx context.Context, userID, resourceOwner, authRequestID, userAgentID string, credentialData []byte, info *domain.BrowserInfo) error
|
2020-12-02 16:00:04 +00:00
|
|
|
|
2022-04-05 05:58:09 +00:00
|
|
|
LinkExternalUsers(ctx context.Context, authReqID, userAgentID string, info *domain.BrowserInfo) error
|
|
|
|
AutoRegisterExternalUser(ctx context.Context, user *domain.Human, externalIDP *domain.UserIDPLink, orgMemberRoles []string, authReqID, userAgentID, resourceOwner string, metadatas []*domain.Metadata, info *domain.BrowserInfo) error
|
|
|
|
ResetLinkingUsers(ctx context.Context, authReqID, userAgentID string) error
|
2023-03-24 15:18:56 +00:00
|
|
|
ResetSelectedIDP(ctx context.Context, authReqID, userAgentID string) error
|
2020-05-18 10:06:36 +00:00
|
|
|
}
|