| | | 1 | | using System.Text.Json.Serialization; |
| | | 2 | | using ArturRios.Heimdall.Shared.Security; |
| | | 3 | | using ArturRios.Mediator.Command; |
| | | 4 | | |
| | | 5 | | namespace ArturRios.Heimdall.Command.Input; |
| | | 6 | | |
| | | 7 | | /// <summary> |
| | | 8 | | /// Intent to set the base links a scope's verification and password-reset emails point at. Shaped |
| | | 9 | | /// like <see cref="SetSelfRegistrationCommand" />: the scope comes from the route and the actor |
| | | 10 | | /// from the token. |
| | | 11 | | /// </summary> |
| | | 12 | | /// <remarks> |
| | | 13 | | /// This is its own command, not two more fields of <see cref="UpdateScopeCommand" />, because that |
| | | 14 | | /// command replaces every field: a client that predates these links and does not send them would |
| | | 15 | | /// erase them on its next update. Here the body is the whole state of the two links, so each one a |
| | | 16 | | /// request omits, sends as <c>null</c> or leaves empty is cleared, and the global setting applies |
| | | 17 | | /// to that email again. |
| | | 18 | | /// </remarks> |
| | | 19 | | public class SetScopeEmailLinksCommand : BaseCommand, IActorScoped |
| | | 20 | | { |
| | | 21 | | [JsonIgnore] |
| | 37 | 22 | | public Guid Id { get; set; } |
| | | 23 | | |
| | | 24 | | /// <summary>Base link for the scope's verification emails, or <c>null</c>/empty to clear it.</summary> |
| | 77 | 25 | | public string? EmailVerificationUrl { get; set; } |
| | | 26 | | |
| | | 27 | | /// <summary>Base link for the scope's password-reset emails, or <c>null</c>/empty to clear it.</summary> |
| | 77 | 28 | | public string? PasswordResetUrl { get; set; } |
| | | 29 | | |
| | | 30 | | [JsonIgnore] |
| | 25 | 31 | | public Guid ActingPersonId { get; set; } |
| | | 32 | | |
| | | 33 | | [JsonIgnore] |
| | 26 | 34 | | public int ActingRole { get; set; } |
| | | 35 | | } |