Introduced new models in EnvelopeGenerator.GeneratorAPI.Models: - Auth, ContactLink, Culture, Cultures, CustomImages, ErrorViewModel, Image, MainViewModel, and TFARegParams. These provide foundational structures for authentication, localization, error handling, image management, and contact links. All changes are new file additions.
14 lines
569 B
C#
14 lines
569 B
C#
namespace EnvelopeGenerator.GeneratorAPI.Models;
|
|
|
|
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);
|
|
} |