2020-05-18 12:06:36 +02:00
|
|
|
package repository
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
2021-09-27 13:43:49 +02:00
|
|
|
|
2022-04-27 01:01:45 +02:00
|
|
|
"github.com/zitadel/zitadel/internal/domain"
|
2020-05-18 12:06:36 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
type AuthRequestRepository interface {
|
2021-02-08 11:30:30 +01:00
|
|
|
CreateAuthRequest(ctx context.Context, request *domain.AuthRequest) (*domain.AuthRequest, error)
|
2022-04-05 07:58:09 +02: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
|
2023-09-29 11:26:14 +02:00
|
|
|
SaveSAMLRequestID(ctx context.Context, id, requestID, userAgentID string) error
|
2022-04-05 07:58:09 +02:00
|
|
|
DeleteAuthRequest(ctx context.Context, id string) error
|
2020-12-02 17:00:04 +01:00
|
|
|
|
2022-04-05 07:58:09 +02:00
|
|
|
CheckLoginName(ctx context.Context, id, loginName, userAgentID string) error
|
2023-08-04 11:35:36 +02:00
|
|
|
CheckExternalUserLogin(ctx context.Context, authReqID, userAgentID string, user *domain.ExternalUser, info *domain.BrowserInfo, migrationCheck bool) error
|
2022-04-05 07:58:09 +02:00
|
|
|
SetExternalUserLogin(ctx context.Context, authReqID, userAgentID string, user *domain.ExternalUser) error
|
2023-06-15 09:02:53 +02:00
|
|
|
SetLinkingUser(ctx context.Context, request *domain.AuthRequest, externalUser *domain.ExternalUser) error
|
2022-04-05 07:58:09 +02: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 17:00:04 +01:00
|
|
|
|
2022-04-05 07:58:09 +02:00
|
|
|
VerifyMFAOTP(ctx context.Context, authRequestID, userID, resourceOwner, code, userAgentID string, info *domain.BrowserInfo) error
|
2023-08-15 14:47:05 +02:00
|
|
|
SendMFAOTPSMS(ctx context.Context, userID, resourceOwner, authRequestID, userAgentID string) error
|
|
|
|
VerifyMFAOTPSMS(ctx context.Context, userID, resourceOwner, code, authRequestID, userAgentID string, info *domain.BrowserInfo) error
|
|
|
|
SendMFAOTPEmail(ctx context.Context, userID, resourceOwner, authRequestID, userAgentID string) error
|
|
|
|
VerifyMFAOTPEmail(ctx context.Context, userID, resourceOwner, code, authRequestID, userAgentID string, info *domain.BrowserInfo) error
|
2022-04-05 07:58:09 +02:00
|
|
|
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 16:19:21 +02:00
|
|
|
BeginPasswordlessSetup(ctx context.Context, userID, resourceOwner string, preferredPlatformType domain.AuthenticatorAttachment) (login *domain.WebAuthNToken, err error)
|
2021-08-02 15:24:58 +02:00
|
|
|
VerifyPasswordlessSetup(ctx context.Context, userID, resourceOwner, userAgentID, tokenName string, credentialData []byte) (err error)
|
2021-10-04 16:19:21 +02:00
|
|
|
BeginPasswordlessInitCodeSetup(ctx context.Context, userID, resourceOwner, codeID, verificationCode string, preferredPlatformType domain.AuthenticatorAttachment) (login *domain.WebAuthNToken, err error)
|
2021-08-02 15:24:58 +02:00
|
|
|
VerifyPasswordlessInitCodeSetup(ctx context.Context, userID, resourceOwner, userAgentID, tokenName, codeID, verificationCode string, credentialData []byte) (err error)
|
2022-04-05 07:58:09 +02: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 17:00:04 +01:00
|
|
|
|
2022-04-05 07:58:09 +02: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 16:18:56 +01:00
|
|
|
ResetSelectedIDP(ctx context.Context, authReqID, userAgentID string) error
|
2020-05-18 12:06:36 +02:00
|
|
|
}
|