File tree 5 files changed +16
-10
lines changed
samples/web/Liuliu.Demo.Web
OSharp.Identity/Authentication/JwtBearer
5 files changed +16
-10
lines changed Original file line number Diff line number Diff line change 2
2
<package xmlns =" http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd" >
3
3
<metadata >
4
4
<id >OSharpNS</id >
5
- <version >3.1.2-preview2.29 </version >
5
+ <version >3.1.2-preview3-01 </version >
6
6
<title >OSharpFramework(.NETCoreApp3.1)</title >
7
7
<authors >柳柳软件(66soft.net)</authors >
8
8
<owners >柳柳软件(66soft.net)</owners >
15
15
<tags >osharp osharpns</tags >
16
16
<dependencies >
17
17
<group targetFramework =" .NETCoreApp3.1" >
18
- <dependency id =" OSharpNS.Core" version =" 3.1.2-preview2.29 " />
19
- <dependency id =" OSharpNS.EntityFrameworkCore" version =" 3.1.2-preview2.29 " />
20
- <dependency id =" OSharpNS.AutoMapper" version =" 3.1.2-preview2.29 " />
21
- <dependency id =" OSharpNS.AspNetCore" version =" 3.1.2-preview2.29 " />
22
- <dependency id =" OSharpNS.Log4Net" version =" 3.1.2-preview2.29 " />
18
+ <dependency id =" OSharpNS.Core" version =" 3.1.2-preview3-01 " />
19
+ <dependency id =" OSharpNS.EntityFrameworkCore" version =" 3.1.2-preview3-01 " />
20
+ <dependency id =" OSharpNS.AutoMapper" version =" 3.1.2-preview3-01 " />
21
+ <dependency id =" OSharpNS.AspNetCore" version =" 3.1.2-preview3-01 " />
22
+ <dependency id =" OSharpNS.Log4Net" version =" 3.1.2-preview3-01 " />
23
23
</group >
24
24
</dependencies >
25
25
</metadata >
Original file line number Diff line number Diff line change 3
3
<VersionMain >3.1</VersionMain >
4
4
<VersionPrefix >2</VersionPrefix >
5
5
<VersionSuffix >-preview</VersionSuffix >
6
- <VersionSuffixVersion >2.29 </VersionSuffixVersion >
6
+ <VersionSuffixVersion >3-01 </VersionSuffixVersion >
7
7
<Version >$(VersionMain).$(VersionPrefix)$(VersionSuffix)$(VersionSuffixVersion)</Version >
8
8
<AssemblyVersion >$(VersionMain).$(VersionPrefix)</AssemblyVersion >
9
9
<FileVersion >$(VersionMain).$(VersionSuffixVersion)</FileVersion >
Original file line number Diff line number Diff line change 22
22
//,
23
23
"MySql" : {
24
24
"DbContextTypeName" : " OSharp.Entity.DefaultDbContext,OSharp.EntityFrameworkCore" ,
25
- "ConnectionString" : " Server=127.0.0.1;UserId=root;Password=abc123456;Database=osharpns-dev2 ;charset='utf8';Allow User Variables=True" ,
25
+ "ConnectionString" : " Server=127.0.0.1;UserId=root;Password=abc123456;Database=osharpns-dev ;charset='utf8';Allow User Variables=True" ,
26
26
"DatabaseType" : " MySql" ,
27
27
"LazyLoadingProxiesEnabled" : true ,
28
28
"AuditEntityEnabled" : true ,
87
87
"Audience" : " osharp angular demo" ,
88
88
"Secret" : " {8619F7C3-B53C-4B85-99F0-983D351ECD82}" ,
89
89
"AccessExpireMins" : 5 ,
90
- "RefreshExpireMins" : 10080 // 7天
90
+ "RefreshExpireMins" : 10080 , // 7天
91
+ "IsRefreshAbsoluteExpired" : false
91
92
},
92
93
"Redis" : {
93
94
"Configuration" : " localhost" ,
Original file line number Diff line number Diff line change @@ -203,7 +203,7 @@ await _provider.ExecuteScopedWorkAsync(async provider =>
203
203
}
204
204
else
205
205
{
206
- if ( refreshToken == null )
206
+ if ( refreshToken == null || ! options . IsRefreshAbsoluteExpired )
207
207
{
208
208
double minutes = options . RefreshExpireMins > 0 ? options . RefreshExpireMins : 10080 ; // 默认7天
209
209
expires = now . AddMinutes ( minutes ) ;
Original file line number Diff line number Diff line change @@ -38,5 +38,10 @@ public class JwtOptions
38
38
/// 获取或设置 RefreshToken有效期分钟数
39
39
/// </summary>
40
40
public double RefreshExpireMins { get ; set ; }
41
+
42
+ /// <summary>
43
+ /// 获取或设置 RefreshToken是否绝对过期
44
+ /// </summary>
45
+ public bool IsRefreshAbsoluteExpired { get ; set ; } = true ;
41
46
}
42
47
}
You can’t perform that action at this time.
0 commit comments