2022-03-01 10:58:02 +00:00
|
|
|
|
namespace ASC.Web.Api.ApiModel.RequestsDto;
|
|
|
|
|
|
2022-03-15 10:00:41 +00:00
|
|
|
|
public class AuthServiceRequestsDto
|
2022-03-01 08:59:06 +00:00
|
|
|
|
{
|
2022-03-01 10:58:02 +00:00
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
public string Title { get; set; }
|
|
|
|
|
public string Description { get; set; }
|
|
|
|
|
public string Instruction { get; set; }
|
|
|
|
|
public bool CanSet { get; set; }
|
|
|
|
|
public List<AuthKey> Props { get; set; }
|
|
|
|
|
|
2022-03-15 10:00:41 +00:00
|
|
|
|
public AuthServiceRequestsDto()
|
2022-03-01 08:59:06 +00:00
|
|
|
|
{
|
|
|
|
|
|
2022-03-01 10:58:02 +00:00
|
|
|
|
}
|
2022-03-01 08:59:06 +00:00
|
|
|
|
|
2022-03-15 10:00:41 +00:00
|
|
|
|
public AuthServiceRequestsDto(Consumer consumer)
|
2022-03-01 10:58:02 +00:00
|
|
|
|
{
|
|
|
|
|
var authService = new AuthService(consumer);
|
2022-03-01 08:59:06 +00:00
|
|
|
|
|
2022-03-01 10:58:02 +00:00
|
|
|
|
Name = authService.Name;
|
|
|
|
|
Title = authService.Title;
|
|
|
|
|
Description = authService.Description;
|
|
|
|
|
Instruction = authService.Instruction;
|
|
|
|
|
CanSet = authService.CanSet;
|
2022-03-01 08:59:06 +00:00
|
|
|
|
|
2022-03-01 10:58:02 +00:00
|
|
|
|
if (consumer.CanSet)
|
|
|
|
|
{
|
|
|
|
|
Props = authService.Props;
|
2022-03-01 08:59:06 +00:00
|
|
|
|
CanSet = authService.CanSet;
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-03-01 10:58:02 +00:00
|
|
|
|
}
|