Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcc739d0

Browse files
committed
Merge branch 'OpenIddictIntegration' into dev/yatou
# Conflicts:#Destiny.Core.Flow.sln
2 parentsf98bb62 +d734104 commitcc739d0

File tree

90 files changed

+45056
-15
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+45056
-15
lines changed

‎.gitignore‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,3 +382,6 @@ src/Destiny.Core.Flow.API/DestinyCoreMongoDb.txt
382382
/src/Destiny.Core.Flow.AuthenticationCenter/DestinyCoreMongoDb.txt
383383
/src/Destiny.Core.Flow.AuthenticationCenter/DestinyCoreRedis.txt
384384
/src/Destiny.Core.Flow.AuthenticationCenter/Logs
385+
Destiny.Core.Flow.OpenIddictServer/DestinyCoreDb.txt
386+
Destiny.Core.Flow.OpenIddictServer/DestinyCoreMongoDb.txt
387+
Destiny.Core.Flow.OpenIddictServer/DestinyCoreRedis.txt

‎Destiny.Core.Flow.sln‎

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
21
Microsoft Visual Studio Solution File, Format Version 12.00
32
# Visual Studio Version 16
43
VisualStudioVersion =16.0.29911.84
54
MinimumVisualStudioVersion =10.0.40219.1
5+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") ="Destiny.Core.Flow.API","src\Destiny.Core.Flow.API\Destiny.Core.Flow.API.csproj","{FF447721-BFD6-40C6-AE23-D672EC225A00}"
6+
EndProject
67
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") ="Destiny.Core.Flow.IServices","src\Destiny.Core.Flow.IServices\Destiny.Core.Flow.IServices.csproj","{0FDF7DC0-77FE-4529-8E8C-D17FF03D84A0}"
78
EndProject
89
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") ="Destiny.Core.Flow.Services","src\Destiny.Core.Flow.Services\Destiny.Core.Flow.Services.csproj","{89D24E5C-7C65-4150-AB7B-656809CC6011}"
@@ -43,22 +44,34 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Destiny.Core.Flow.EntityFra
4344
EndProject
4445
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") ="Destiny.Core.Flow.Shared","src\Destiny.Core.Flow.Shared\Destiny.Core.Flow.Shared.csproj","{96659BA9-6B77-42ED-86B3-23354B321E50}"
4546
EndProject
47+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") ="Destiny.Core.Flow.OpenIddict","src\Destiny.Core.Flow.OpenIddict\Destiny.Core.Flow.OpenIddict.csproj","{BD72166A-F174-4AAC-B4A4-2014344AC838}"
48+
EndProject
4649
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") ="Destiny.Core.Flow.Core","src\Destiny.Core.Flow.Core\Destiny.Core.Flow.Core.csproj","{EA0C5DAC-48E2-4637-BB89-DC75C06C5C7F}"
4750
EndProject
51+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") ="Destiny.Core.Flow.OpenIddict.EntityFrameworkCore","src\Destiny.Core.Flow.OpenIddict.EntityFrameworkCore\Destiny.Core.Flow.OpenIddict.EntityFrameworkCore.csproj","{1A1BEC20-1732-4F07-8E6A-3E40F6017DE2}"
52+
EndProject
4853
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") ="Destiny.Core.Flow.AspNetCore","src\Destiny.Core.Flow.AspNetCore\Destiny.Core.Flow.AspNetCore.csproj","{3FE110EB-A8CB-4DF1-8BFF-9159351349CE}"
4954
EndProject
55+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") ="Destiny.Core.Flow.OpenIddict.Mongo","src\Destiny.Core.Flow.OpenIddict.Mongo\Destiny.Core.Flow.OpenIddict.Mongo.csproj","{C6F079D6-CF39-4271-9392-152D69853547}"
56+
EndProject
5057
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") ="Destiny.Core.Flow.AspNetCore.TestBase","src\Destiny.Core.Flow.AspNetCore.TestBase\Destiny.Core.Flow.AspNetCore.TestBase.csproj","{8B484D44-3BFF-4644-962E-913A0F43C134}"
5158
EndProject
59+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") ="Destiny.Core.Flow.OpenIddictServer","src\Destiny.Core.Flow.OpenIddictServer\Destiny.Core.Flow.OpenIddictServer.csproj","{510BEEE3-8391-478B-A979-6C0D19C80CFE}"
60+
EndProject
5261
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") ="Destiny.Core.AspNetMvc.Test","test\Destiny.Core.AspNetMvc.Test\Destiny.Core.AspNetMvc.Test.csproj","{FE52DE20-B86E-46A2-8E21-98E9825C2530}"
5362
EndProject
54-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") ="Destiny.Core.Flow.API","src\Destiny.Core.Flow.API\Destiny.Core.Flow.API.csproj","{EF17885B-ED88-4997-AFB4-63FE0DF1E414}"
63+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") ="Destiny.Core.Flow.OpenIddict.Entities","src\Destiny.Core.Flow.OpenIddict.Entities\Destiny.Core.Flow.OpenIddict.Entities.csproj","{91D50159-AB2B-4E1A-B9D3-C6A74C057930}"
5564
EndProject
5665
Global
5766
GlobalSection(SolutionConfigurationPlatforms) =preSolution
5867
Debug|Any CPU=Debug|Any CPU
5968
Release|Any CPU=Release|Any CPU
6069
EndGlobalSection
6170
GlobalSection(ProjectConfigurationPlatforms) =postSolution
71+
{FF447721-BFD6-40C6-AE23-D672EC225A00}.Debug|Any CPU.ActiveCfg=Debug|Any CPU
72+
{FF447721-BFD6-40C6-AE23-D672EC225A00}.Debug|Any CPU.Build.0=Debug|Any CPU
73+
{FF447721-BFD6-40C6-AE23-D672EC225A00}.Release|Any CPU.ActiveCfg=Release|Any CPU
74+
{FF447721-BFD6-40C6-AE23-D672EC225A00}.Release|Any CPU.Build.0=Release|Any CPU
6275
{0FDF7DC0-77FE-4529-8E8C-D17FF03D84A0}.Debug|Any CPU.ActiveCfg=Debug|Any CPU
6376
{0FDF7DC0-77FE-4529-8E8C-D17FF03D84A0}.Debug|Any CPU.Build.0=Debug|Any CPU
6477
{0FDF7DC0-77FE-4529-8E8C-D17FF03D84A0}.Release|Any CPU.ActiveCfg=Release|Any CPU
@@ -115,31 +128,48 @@ Global
115128
{96659BA9-6B77-42ED-86B3-23354B321E50}.Debug|Any CPU.Build.0=Debug|Any CPU
116129
{96659BA9-6B77-42ED-86B3-23354B321E50}.Release|Any CPU.ActiveCfg=Release|Any CPU
117130
{96659BA9-6B77-42ED-86B3-23354B321E50}.Release|Any CPU.Build.0=Release|Any CPU
131+
{BD72166A-F174-4AAC-B4A4-2014344AC838}.Debug|Any CPU.ActiveCfg=Debug|Any CPU
132+
{BD72166A-F174-4AAC-B4A4-2014344AC838}.Debug|Any CPU.Build.0=Debug|Any CPU
133+
{BD72166A-F174-4AAC-B4A4-2014344AC838}.Release|Any CPU.ActiveCfg=Release|Any CPU
134+
{BD72166A-F174-4AAC-B4A4-2014344AC838}.Release|Any CPU.Build.0=Release|Any CPU
118135
{EA0C5DAC-48E2-4637-BB89-DC75C06C5C7F}.Debug|Any CPU.ActiveCfg=Debug|Any CPU
119136
{EA0C5DAC-48E2-4637-BB89-DC75C06C5C7F}.Debug|Any CPU.Build.0=Debug|Any CPU
120137
{EA0C5DAC-48E2-4637-BB89-DC75C06C5C7F}.Release|Any CPU.ActiveCfg=Release|Any CPU
121138
{EA0C5DAC-48E2-4637-BB89-DC75C06C5C7F}.Release|Any CPU.Build.0=Release|Any CPU
139+
{1A1BEC20-1732-4F07-8E6A-3E40F6017DE2}.Debug|Any CPU.ActiveCfg=Debug|Any CPU
140+
{1A1BEC20-1732-4F07-8E6A-3E40F6017DE2}.Debug|Any CPU.Build.0=Debug|Any CPU
141+
{1A1BEC20-1732-4F07-8E6A-3E40F6017DE2}.Release|Any CPU.ActiveCfg=Release|Any CPU
142+
{1A1BEC20-1732-4F07-8E6A-3E40F6017DE2}.Release|Any CPU.Build.0=Release|Any CPU
122143
{3FE110EB-A8CB-4DF1-8BFF-9159351349CE}.Debug|Any CPU.ActiveCfg=Debug|Any CPU
123144
{3FE110EB-A8CB-4DF1-8BFF-9159351349CE}.Debug|Any CPU.Build.0=Debug|Any CPU
124145
{3FE110EB-A8CB-4DF1-8BFF-9159351349CE}.Release|Any CPU.ActiveCfg=Release|Any CPU
125146
{3FE110EB-A8CB-4DF1-8BFF-9159351349CE}.Release|Any CPU.Build.0=Release|Any CPU
147+
{C6F079D6-CF39-4271-9392-152D69853547}.Debug|Any CPU.ActiveCfg=Debug|Any CPU
148+
{C6F079D6-CF39-4271-9392-152D69853547}.Debug|Any CPU.Build.0=Debug|Any CPU
149+
{C6F079D6-CF39-4271-9392-152D69853547}.Release|Any CPU.ActiveCfg=Release|Any CPU
150+
{C6F079D6-CF39-4271-9392-152D69853547}.Release|Any CPU.Build.0=Release|Any CPU
126151
{8B484D44-3BFF-4644-962E-913A0F43C134}.Debug|Any CPU.ActiveCfg=Debug|Any CPU
127152
{8B484D44-3BFF-4644-962E-913A0F43C134}.Debug|Any CPU.Build.0=Debug|Any CPU
128153
{8B484D44-3BFF-4644-962E-913A0F43C134}.Release|Any CPU.ActiveCfg=Release|Any CPU
129154
{8B484D44-3BFF-4644-962E-913A0F43C134}.Release|Any CPU.Build.0=Release|Any CPU
155+
{510BEEE3-8391-478B-A979-6C0D19C80CFE}.Debug|Any CPU.ActiveCfg=Debug|Any CPU
156+
{510BEEE3-8391-478B-A979-6C0D19C80CFE}.Debug|Any CPU.Build.0=Debug|Any CPU
157+
{510BEEE3-8391-478B-A979-6C0D19C80CFE}.Release|Any CPU.ActiveCfg=Release|Any CPU
158+
{510BEEE3-8391-478B-A979-6C0D19C80CFE}.Release|Any CPU.Build.0=Release|Any CPU
130159
{FE52DE20-B86E-46A2-8E21-98E9825C2530}.Debug|Any CPU.ActiveCfg=Debug|Any CPU
131160
{FE52DE20-B86E-46A2-8E21-98E9825C2530}.Debug|Any CPU.Build.0=Debug|Any CPU
132161
{FE52DE20-B86E-46A2-8E21-98E9825C2530}.Release|Any CPU.ActiveCfg=Release|Any CPU
133162
{FE52DE20-B86E-46A2-8E21-98E9825C2530}.Release|Any CPU.Build.0=Release|Any CPU
134-
{EF17885B-ED88-4997-AFB4-63FE0DF1E414}.Debug|Any CPU.ActiveCfg=Debug|Any CPU
135-
{EF17885B-ED88-4997-AFB4-63FE0DF1E414}.Debug|Any CPU.Build.0=Debug|Any CPU
136-
{EF17885B-ED88-4997-AFB4-63FE0DF1E414}.Release|Any CPU.ActiveCfg=Release|Any CPU
137-
{EF17885B-ED88-4997-AFB4-63FE0DF1E414}.Release|Any CPU.Build.0=Release|Any CPU
163+
{91D50159-AB2B-4E1A-B9D3-C6A74C057930}.Debug|Any CPU.ActiveCfg=Debug|Any CPU
164+
{91D50159-AB2B-4E1A-B9D3-C6A74C057930}.Debug|Any CPU.Build.0=Debug|Any CPU
165+
{91D50159-AB2B-4E1A-B9D3-C6A74C057930}.Release|Any CPU.ActiveCfg=Release|Any CPU
166+
{91D50159-AB2B-4E1A-B9D3-C6A74C057930}.Release|Any CPU.Build.0=Release|Any CPU
138167
EndGlobalSection
139168
GlobalSection(SolutionProperties) =preSolution
140169
HideSolutionNode =FALSE
141170
EndGlobalSection
142171
GlobalSection(NestedProjects) =preSolution
172+
{FF447721-BFD6-40C6-AE23-D672EC225A00} ={9A347066-1CEA-4FD6-BD7E-598A7FF21E6C}
143173
{0FDF7DC0-77FE-4529-8E8C-D17FF03D84A0} ={5D6E6ADE-8C66-4955-9DC6-C8610EDE9DE6}
144174
{89D24E5C-7C65-4150-AB7B-656809CC6011} ={5D6E6ADE-8C66-4955-9DC6-C8610EDE9DE6}
145175
{3350DDC6-02D0-4986-9F13-17B8B94B9456} ={5D6E6ADE-8C66-4955-9DC6-C8610EDE9DE6}
@@ -158,11 +188,15 @@ Global
158188
{4D580BFD-1D8A-4A23-B152-5A6739F26C97} ={9A347066-1CEA-4FD6-BD7E-598A7FF21E6C}
159189
{A238B019-A658-4F10-980C-6EBBAE4FB596} ={968F74F4-4D0A-4832-A7EA-5CB2BA08AF8A}
160190
{96659BA9-6B77-42ED-86B3-23354B321E50} ={968F74F4-4D0A-4832-A7EA-5CB2BA08AF8A}
191+
{BD72166A-F174-4AAC-B4A4-2014344AC838} ={968F74F4-4D0A-4832-A7EA-5CB2BA08AF8A}
161192
{EA0C5DAC-48E2-4637-BB89-DC75C06C5C7F} ={968F74F4-4D0A-4832-A7EA-5CB2BA08AF8A}
193+
{1A1BEC20-1732-4F07-8E6A-3E40F6017DE2} ={968F74F4-4D0A-4832-A7EA-5CB2BA08AF8A}
162194
{3FE110EB-A8CB-4DF1-8BFF-9159351349CE} ={968F74F4-4D0A-4832-A7EA-5CB2BA08AF8A}
195+
{C6F079D6-CF39-4271-9392-152D69853547} ={968F74F4-4D0A-4832-A7EA-5CB2BA08AF8A}
163196
{8B484D44-3BFF-4644-962E-913A0F43C134} ={968F74F4-4D0A-4832-A7EA-5CB2BA08AF8A}
197+
{510BEEE3-8391-478B-A979-6C0D19C80CFE} ={9A347066-1CEA-4FD6-BD7E-598A7FF21E6C}
164198
{FE52DE20-B86E-46A2-8E21-98E9825C2530} ={B74CBBDD-8574-4768-AA9D-2144A77D4875}
165-
{EF17885B-ED88-4997-AFB4-63FE0DF1E414} ={9A347066-1CEA-4FD6-BD7E-598A7FF21E6C}
199+
{91D50159-AB2B-4E1A-B9D3-C6A74C057930} ={968F74F4-4D0A-4832-A7EA-5CB2BA08AF8A}
166200
EndGlobalSection
167201
GlobalSection(ExtensibilityGlobals) =postSolution
168202
SolutionGuid ={468F450C-837F-4FCD-8E06-3E12690DDED6}

‎src/Destiny.Core.Flow.API/appsettings.Development.json‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@
8181
"MongoDBs": {
8282
"MongoDBConnectionString":"DestinyCoreMongoDb.txt",//开发用数据库
8383

84+
},
85+
"MongoDBs": {
86+
"MongoDBConnectionString":"DestinyCoreMongoDb.txt",//开发用数据库
87+
8488
},
8589
"Redis": {
8690
"ConnectionString":"DestinyCoreRedis.txt"

‎src/Destiny.Core.Flow.IdentityServer.Entities/Destiny.Core.Flow.IdentityServer.Entities.csproj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<ProjectSdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net5.0</TargetFramework>
4+
<TargetFramework>netstandard2.1</TargetFramework>
55
</PropertyGroup>
66

77
<ItemGroup>

‎src/Destiny.Core.Flow.Model/Destiny.Core.Flow.Model.csproj‎

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,13 @@
44
<TargetFramework>net5.0</TargetFramework>
55
</PropertyGroup>
66

7-
<ItemGroup>
8-
<CompileRemove="EntityConfigurations\IdentityServer4\**" />
9-
<EmbeddedResourceRemove="EntityConfigurations\IdentityServer4\**" />
10-
<NoneRemove="EntityConfigurations\IdentityServer4\**" />
11-
</ItemGroup>
12-
137
<ItemGroup>
148
<PackageReferenceInclude="DestinyCore"Version="1.0.1" />
159
<PackageReferenceInclude="DestinyCore.EntityFrameworkCore"Version="1.0.1" />
1610
<PackageReferenceInclude="DestinyCore.FluentValidation"Version="1.0.1" />
1711
<PackageReferenceInclude="DestinyCore.TestBase"Version="1.0.1" />
1812
<PackageReferenceInclude="DestinyCore.AutoMapper"Version="1.0.1" />
19-
<PackageReferenceInclude="Microsoft.EntityFrameworkCore.Design"Version="5.0.6">
13+
<PackageReferenceInclude="Microsoft.EntityFrameworkCore.Design"Version="5.0.7">
2014
<PrivateAssets>all</PrivateAssets>
2115
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2216
</PackageReference>
@@ -25,9 +19,11 @@
2519
</ItemGroup>
2620

2721
<ItemGroup>
22+
<ProjectReferenceInclude="..\..\Destiny.Core.Flow.OpenIddict.Entities\Destiny.Core.Flow.OpenIddict.Entities.csproj" />
2823
<ProjectReferenceInclude="..\Destiny.Core.Flow.EntityFrameworkCore\Destiny.Core.Flow.EntityFrameworkCore.csproj" />
2924
<ProjectReferenceInclude="..\Destiny.Core.Flow.IdentityServer.Entities\Destiny.Core.Flow.IdentityServer.Entities.csproj" />
3025
<ProjectReferenceInclude="..\Destiny.Core.Flow.Identity\Destiny.Core.Flow.Identitys.csproj" />
26+
<ProjectReferenceInclude="..\Destiny.Core.Flow.OpenIddict.Entities\Destiny.Core.Flow.OpenIddict.Entities.csproj" />
3127
</ItemGroup>
3228

3329
</Project>
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
usingDestinyCore.Entity;
2+
usingSystem;
3+
usingSystem.Collections.Generic;
4+
5+
namespaceDestiny.Core.Flow.Model.Entities.OpenIddict
6+
{
7+
publicabstractclassApplicationBase<TKey>:ApplicationBase<TKey,AuthorizationBase<TKey>,TokenBase<TKey>>whereTKey:IEquatable<TKey>
8+
{
9+
10+
}
11+
12+
/// <summary>
13+
/// 应用
14+
/// </summary>
15+
/// <typeparam name="TKey">id类型</typeparam>
16+
/// <typeparam name="TAuthorization">验证类型</typeparam>
17+
/// <typeparam name="TToken">令牌类型</typeparam>
18+
publicabstractclassApplicationBase<TKey,TAuthorization,TToken>:EntityBase<TKey>
19+
whereTKey:IEquatable<TKey>
20+
whereTAuthorization:class
21+
whereTToken:class
22+
{
23+
/// <summary>
24+
/// 应用关联的验证列表
25+
/// </summary>
26+
publicvirtualICollection<TAuthorization>Authorizations{get;}=newHashSet<TAuthorization>();
27+
28+
/// <summary>
29+
/// 应用标识
30+
/// </summary>
31+
publicvirtualstringClientId{get;set;}
32+
33+
/// <summary>
34+
/// 应用密钥
35+
/// </summary>
36+
publicvirtualstringClientSecret{get;set;}
37+
38+
/// <summary>
39+
/// 并发令牌 用于乐观锁
40+
/// </summary>
41+
publicvirtualstringConcurrencyToken{get;set;}=Guid.NewGuid().ToString();
42+
43+
/// <summary>
44+
/// 许可类型 分别为显式、隐式、系统、外部
45+
/// </summary>
46+
publicvirtualstringConsentType{get;set;}
47+
48+
/// <summary>
49+
/// 显示名称
50+
/// </summary>
51+
publicvirtualstringDisplayName{get;set;}
52+
53+
/// <summary>
54+
/// 本地化显示名称列表 序列化为json 例如: {"en-US":"Application cliente MVC"}
55+
/// </summary>
56+
publicvirtualstringDisplayNames{get;set;}
57+
58+
/// <summary>
59+
/// 权限列表 序列化为json 例如: [""gt:password",,"scp:email","scp:profile"]
60+
/// </summary>
61+
publicvirtualstringPermissions{get;set;}
62+
63+
/// <summary>
64+
/// 退出回调uri列表 序列化为json 例如: ["https://localhost:44381/signout-oidc"]
65+
/// </summary>
66+
publicvirtualstringPostLogoutRedirectUris{get;set;}
67+
68+
/// <summary>
69+
/// 应用附加属性列表 序列化为json
70+
/// </summary>
71+
publicvirtualstringProperties{get;set;}
72+
73+
/// <summary>
74+
/// 登录回调uri列表 序列化为json 例如: ["https://localhost:44381/signin-oidc"]
75+
/// </summary>
76+
publicvirtualstringRedirectUris{get;set;}
77+
78+
/// <summary>
79+
/// 所需条件列表 序列化为json
80+
/// </summary>
81+
publicvirtualstringRequirements{get;set;}
82+
83+
/// <summary>
84+
/// 关联token列表
85+
/// </summary>
86+
publicvirtualICollection<TToken>Tokens{get;}=newHashSet<TToken>();
87+
88+
/// <summary>
89+
/// 应用类型 分为秘密、公开
90+
/// </summary>
91+
publicvirtualstringType{get;set;}
92+
}
93+
}
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
usingDestinyCore.Entity;
2+
usingSystem;
3+
usingSystem.Collections.Generic;
4+
5+
namespaceDestiny.Core.Flow.Model.Entities.OpenIddict
6+
{
7+
8+
publicabstractclassAuthorizationBase<TKey>:AuthorizationBase<TKey,ApplicationBase<TKey>,AuthorizationBase<TKey>>whereTKey:IEquatable<TKey>
9+
{
10+
11+
}
12+
13+
/// <summary>
14+
/// 验证
15+
/// </summary>
16+
/// <typeparam name="TKey">id类型</typeparam>
17+
publicabstractclassAuthorizationBase<TKey,TApplication,TAuthorization>:EntityBase<TKey>,ICreatedTime
18+
whereTKey:IEquatable<TKey>
19+
whereTApplication:class
20+
whereTAuthorization:class
21+
{
22+
/// <summary>
23+
/// 关联验证
24+
/// </summary>
25+
publicvirtualTAuthorizationAuthorization{get;set;}
26+
/// <summary>
27+
/// 关联应用
28+
/// </summary>
29+
publicvirtualTApplicationApplication{get;set;}
30+
31+
/// <summary>
32+
/// 并发令牌
33+
/// </summary>
34+
publicvirtualstringConcurrencyToken{get;set;}=Guid.NewGuid().ToString();
35+
36+
/// <summary>
37+
/// 创建时间
38+
/// </summary>
39+
publicDateTimeCreatedTime{get;set;}
40+
41+
/// <summary>
42+
/// 附加属性列表 序列化为json
43+
/// </summary>
44+
publicvirtualstringProperties{get;set;}
45+
46+
/// <summary>
47+
/// 授权范围列表 序列化为json
48+
/// </summary>
49+
publicvirtualstringScopes{get;set;}
50+
51+
/// <summary>
52+
/// 状态 未激活(inactive) 已赎回(redeemed) 拒绝(rejected) 废除(revoked) 可用(valid)
53+
/// </summary>
54+
publicvirtualstringStatus{get;set;}
55+
56+
/// <summary>
57+
/// 所属用户
58+
/// </summary>
59+
publicvirtualstringSubject{get;set;}
60+
61+
/// <summary>
62+
/// token列表
63+
/// </summary>
64+
publicvirtualICollection<TokenBase<TKey>>Tokens{get;}=newHashSet<TokenBase<TKey>>();
65+
66+
/// <summary>
67+
/// 验证类型 临时(ad-hoc) 永久(permanent)
68+
/// </summary>
69+
publicvirtualstringType{get;set;}
70+
}
71+
}
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
usingDestinyCore.Entity;
2+
usingSystem;
3+
4+
namespaceDestiny.Core.Flow.Model.Entities.OpenIddict
5+
{
6+
/// <summary>
7+
/// 授权范围
8+
/// </summary>
9+
/// <typeparam name="TKey">id类型</typeparam>
10+
publicabstractclassScopeBase<TKey>:EntityBase<TKey>whereTKey:IEquatable<TKey>
11+
{
12+
/// <summary>
13+
/// 并发令牌 用于乐观锁
14+
/// </summary>
15+
publicvirtualstringConcurrencyToken{get;set;}=Guid.NewGuid().ToString();
16+
17+
/// <summary>
18+
/// 描述
19+
/// </summary>
20+
publicvirtualstringDescription{get;set;}
21+
22+
/// <summary>
23+
/// 本地化描述 序列化为json
24+
/// </summary>
25+
publicvirtualstringDescriptions{get;set;}
26+
27+
/// <summary>
28+
/// 显示名称
29+
/// </summary>
30+
publicvirtualstringDisplayName{get;set;}
31+
32+
/// <summary>
33+
/// 本地化显示名称 序列化为json
34+
/// </summary>
35+
publicvirtualstringDisplayNames{get;set;}
36+
37+
38+
/// <summary>
39+
/// 范围名称
40+
/// </summary>
41+
publicvirtualstringName{get;set;}
42+
43+
/// <summary>
44+
/// 附加属性列表 序列化为json
45+
/// </summary>
46+
publicvirtualstringProperties{get;set;}
47+
48+
/// <summary>
49+
/// 关联资源列表 序列化为json
50+
/// </summary>
51+
publicvirtualstringResources{get;set;}
52+
}
53+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp