| | | 1 | | namespace ArturRios.Heimdall.Command.Services; |
| | | 2 | | |
| | | 3 | | /// <summary> |
| | | 4 | | /// What UC-47 hands to the background: who asked to be registered, where, and the password already |
| | | 5 | | /// hashed. Whether the address is free is not known yet. The plaintext password never gets here. |
| | | 6 | | /// </summary> |
| | 54 | 7 | | public sealed record RegistrationRequest( |
| | 54 | 8 | | Guid ScopeId, |
| | 25 | 9 | | string Name, |
| | 97 | 10 | | string Email, |
| | 27 | 11 | | byte[] PasswordHash, |
| | 80 | 12 | | byte[] Salt); |
| | | 13 | | |
| | | 14 | | /// <summary> |
| | | 15 | | /// Takes UC-47's address-dependent work off the request path (AF-47b), as |
| | | 16 | | /// <see cref="IPasswordRecoveryQueue" /> does for UC-12. <see cref="RegistrationProcessor" /> does it |
| | | 17 | | /// later, so the response cannot be timed to learn whether the address is registered. |
| | | 18 | | /// </summary> |
| | | 19 | | public interface IRegistrationQueue |
| | | 20 | | { |
| | | 21 | | /// <summary> |
| | | 22 | | /// Queues the request without waiting. Returns <c>false</c> when the queue is full and the |
| | | 23 | | /// request was dropped; the caller's answer must not change either way. |
| | | 24 | | /// </summary> |
| | | 25 | | bool TryEnqueue(RegistrationRequest request); |
| | | 26 | | } |