| | | 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 turn Google Sign-In on or off for a scope (UC-24, FR-GO-01/FR-GO-02). The scope is |
| | | 9 | | /// addressed by its <c>PublicId</c> (GUID), assigned from the route. |
| | | 10 | | /// <see cref="ActingPersonId" />/<see cref="ActingRole" /> are set by the controller from the |
| | | 11 | | /// authenticated caller (for the AF-24b ownership check) and are never bound from the request. |
| | | 12 | | /// All three are <c>[JsonIgnore]</c>, so they are not deserialized from the body and do not |
| | | 13 | | /// appear in the request schema. |
| | | 14 | | /// </summary> |
| | | 15 | | public class SetGoogleSignInCommand : BaseCommand, IActorScoped |
| | | 16 | | { |
| | | 17 | | /// <summary>Public identifier of the scope whose setting is changing (assigned from the route).</summary> |
| | | 18 | | [JsonIgnore] |
| | 48 | 19 | | public Guid Id { get; set; } |
| | | 20 | | |
| | | 21 | | /// <summary> |
| | | 22 | | /// The value to write to the scope's <c>GoogleSignInEnabled</c> flag. Nullable on purpose: a |
| | | 23 | | /// plain <c>bool</c> would bind a body that omits the field to <c>false</c>, so a malformed |
| | | 24 | | /// request would silently *disable* Google Sign-In. The validator refuses <c>null</c>, which |
| | | 25 | | /// turns that into an explicit 400 (NFR-10). |
| | | 26 | | /// </summary> |
| | 43 | 27 | | public bool? Enabled { get; set; } |
| | | 28 | | |
| | | 29 | | [JsonIgnore] |
| | 32 | 30 | | public Guid ActingPersonId { get; set; } |
| | | 31 | | |
| | | 32 | | [JsonIgnore] |
| | 32 | 33 | | public int ActingRole { get; set; } |
| | | 34 | | } |