Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

1.5 KB
Raw Blame
//-----------------------------------------------------------------------
// <copyright file="MobileLoginSubmitRequest.cs" company="aliasvault">
// Copyright (c) aliasvault. All rights reserved.
// Licensed under the AGPLv3 license. See LICENSE.md file in the project root for full license information.
// </copyright>
//-----------------------------------------------------------------------

namespace AliasVault.Shared.Models.WebApi.V2.Auth;

using System.ComponentModel.DataAnnotations;

/// <summary>
/// Request for POST /v2/Auth/mobile-login/submit.
/// </summary>
public class MobileLoginSubmitRequest
{
    /// <summary>
    /// Gets or sets the request identifier.
    /// </summary>
    [Required]
    [StringLength(32)]
    public required string RequestId { get; set; }

    /// <summary>
    /// Gets or sets the Account Key, encrypted with the client's RSA public key (base64).
    /// </summary>
    [Required]
    [StringLength(1024)]
    public required string EncryptedAccountKey { get; set; }

    /// <summary>
    /// Gets or sets the algorithm of <see cref="EncryptedAccountKey"/>, as a VaultKeyAlgorithm token.
    /// </summary>
    [Required]
    public required string Algorithm { get; set; }

    /// <summary>
    /// Gets or sets the approving user's Ed25519 signature over the approval (see <c>Signing.MobileLoginApprovalMessage</c>).
    /// Optional while app versions that do not sign are supported.
    /// </summary>
    public string? Signature { get; set; }
}