You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Connected.Framework/Connected.Security/Authentication/PinAuthenticationArgs.cs

31 lines
984 B

2 years ago
using System.ComponentModel.DataAnnotations;
namespace Connected.Security.Authentication
{
/// <summary>
/// Represents the authentication args when authenticating users by their Pin
/// code.
/// </summary>
/// <remarks>
/// This is slightly different from a <see cref="BasicAuthenticationArgs"/> authorization
/// used in cases where users have duals security needs, the password for the direct access to
/// the environment, for example by using login screen on the front end and the pin code used
/// by security cards used by alternative authentication protocols.
/// </remarks>
public sealed class PinAuthenticationArgs : AuthenticationArgs
{
/// <summary>
/// The user's identity. It can contain login name, email or authentication token.
/// </summary>
[Required]
[MaxLength(128)]
public string User { get; init; }
/// <summary>
/// The user's Pin code.
/// </summary>
[Required]
[MaxLength(32)]
public string Pin { get; init; }
}
}