feat(identity): confirm registration email atomically
This commit is contained in:
1 parent
8e7ce8d71c
commit
fade4e76e4
75 files changed
+4188
-403
No files matched your search
@@ -121,6 +121,14 @@ type ConsentLedger interface {
|
||||
// CurrentContact.
|
||||
Current(ctx context.Context, subjectID uuid.UUID, purpose domain.ConsentPurpose) (domain.ConsentRecord, error)
|
||||
|
||||
// LockRegistration returns and locks the active registration C1 for one
|
||||
// registration version, or ErrConsentNotFound. Email confirmation calls it
|
||||
// inside the same transaction after consuming the token and applying the
|
||||
// pending credentials to the account, in token -> account -> registration C1
|
||||
// lock order. Keep all confirmation effects in that transaction so they
|
||||
// commit together after this check succeeds or roll back together on error.
|
||||
LockRegistration(ctx context.Context, subjectID uuid.UUID, registrationVersion int64) (domain.ConsentRecord, error)
|
||||
|
||||
// CurrentContact returns the unrevoked C4 records of the subject for the
|
||||
// organization, newest first, one per accepted invitation. The result
|
||||
// is empty when there is none.
|
||||
|
||||
Reference in new issue
Block a user