1
0
mirror of https://github.com/bitwarden/server synced 2025-12-21 10:43:44 +00:00

api for requesting installation ids

This commit is contained in:
Kyle Spearrin
2017-08-15 16:31:19 -04:00
parent 5576028c7a
commit a2dc1602f8
4 changed files with 78 additions and 1 deletions

View File

@@ -0,0 +1,22 @@
using Bit.Core.Models.Table;
using System.ComponentModel.DataAnnotations;
namespace Bit.Core.Models.Api
{
public class InstallationRequestModel
{
[Required]
[EmailAddress]
public string Email { get; set; }
public Installation ToInstallation()
{
return new Installation
{
Key = Utilities.CoreHelpers.SecureRandomString(20),
Email = Email,
Enabled = true
};
}
}
}