Files
EnvelopeGenerator/EnvelopeGenerator.Server/EnvelopeGenerator.Server/Models/Auth.cs
TekH f4571320ce Mark Auth record as obsolete with replacement guidance
The `Auth` record in the `EnvelopeGenerator.Server.Models`
namespace has been marked as `[Obsolete]` with the message
"Use auth DTO" to indicate it is outdated and should be
replaced with a newer implementation.

The `Auth` record includes the following properties:
- `AccessCode`, `SmsCode`, `AuthenticatorCode` (nullable strings)
- `UserSelectSMS` (boolean)

Additionally, it defines computed properties `HasAccessCode`
and `HasSmsCode` to check for the presence of `AccessCode`
and `SmsCode`, respectively.
2026-06-25 13:37:05 +02:00

15 lines
590 B
C#

namespace EnvelopeGenerator.Server.Models;
[Obsolete("Use auth DTO")]
public record Auth(string? AccessCode = null, string? SmsCode = null, string? AuthenticatorCode = null, bool UserSelectSMS = default)
{
public bool HasAccessCode => AccessCode is not null;
public bool HasSmsCode => SmsCode is not null;
public bool HasAuthenticatorCode => AuthenticatorCode is not null;
public bool HasMulti => new[] { HasAccessCode, HasSmsCode, HasAuthenticatorCode }.Count(state => state) > 1;
public bool HasNone => !(HasAccessCode || HasSmsCode || HasAuthenticatorCode);
}