-
Notifications
You must be signed in to change notification settings - Fork 1
/
ApplicationCreateModel.cs
57 lines (47 loc) · 1.89 KB
/
ApplicationCreateModel.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
using System.Collections.Generic;
namespace SharpGrip.OpenIddict.Api.Models.Application
{
public class ApplicationCreateModel : CreateModel, IApplicationWriteModel
{
public string? DisplayName { get; set; }
public string? Type { get; set; }
public string? ConsentType { get; set; }
public string? ClientId { get; set; }
public string? ClientSecret { get; set; }
public List<string> PostLogoutRedirectUris { get; set; } = new List<string>();
public List<string> RedirectUris { get; set; } = new List<string>();
public List<string> EndpointPermissions { get; set; } = new List<string>();
public List<string> GrantTypePermissions { get; set; } = new List<string>();
public List<string> ResponseTypesPermissions { get; set; } = new List<string>();
public List<string> ScopePermissions { get; set; } = new List<string>();
public List<string> CustomScopePermissions { get; set; } = new List<string>();
public List<string> FeatureRequirements { get; set; } = new List<string>();
public IEnumerable<string> GetPermissions()
{
foreach (var permission in EndpointPermissions)
{
yield return permission;
}
foreach (var permission in GrantTypePermissions)
{
yield return permission;
}
foreach (var permission in ResponseTypesPermissions)
{
yield return permission;
}
foreach (var permission in ScopePermissions)
{
yield return permission;
}
foreach (var permission in CustomScopePermissions)
{
yield return permission;
}
}
public IEnumerable<string> GetRequirements()
{
return FeatureRequirements;
}
}
}