Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.
//-----------------------------------------------------------------------
// <copyright file="LoginInitiateResponse.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.V1.Auth;
using System.Text.Json.Serialization;
/// <summary>
/// Represents a login response.
/// </summary>
public class LoginInitiateResponse
{
/// <summary>
/// Initializes a new instance of the <see cref="LoginInitiateResponse"/> class.
/// </summary>
/// <param name="salt">Salt.</param>
/// <param name="serverEphemeral">Server ephemeral.</param>
/// <param name="encryptionType">Encryption type.</param>
/// <param name="encryptionSettings">Encryption settings.</param>
/// <param name="srpIdentity">The SRP identity.</param>
public LoginInitiateResponse(string salt, string serverEphemeral, string encryptionType, string encryptionSettings, string srpIdentity)
{
Salt = salt;
ServerEphemeral = serverEphemeral;
EncryptionType = encryptionType;
EncryptionSettings = encryptionSettings;
SrpIdentity = srpIdentity;
}
/// <summary>
/// Gets or sets the salt.
/// </summary>
[JsonPropertyName("salt")]
public string Salt { get; set; }
/// <summary>
/// Gets or sets the server's public ephemeral value.
/// </summary>
[JsonPropertyName("serverEphemeral")]
public string ServerEphemeral { get; set; }
/// <summary>
/// Gets or sets the encryption type.
/// </summary>
[JsonPropertyName("encryptionType")]
public string EncryptionType { get; set; }
/// <summary>
/// Gets or sets the encryption settings.
/// </summary>
[JsonPropertyName("encryptionSettings")]
public string EncryptionSettings { get; set; }
/// <summary>
/// Gets or sets the SRP identity to use for authentication. This is a fixed value that doesn't change
/// even if the display username is updated. Clients should use this value (instead of the typed username)
/// for all SRP operations.
/// </summary>
[JsonPropertyName("srpIdentity")]
public string SrpIdentity { get; set; }
}