mirror of https://github.com/abpframework/abp.git
2 changed files with 27 additions and 0 deletions
@ -0,0 +1,18 @@ |
|||
using Microsoft.AspNetCore.Identity; |
|||
using static Volo.Abp.Identity.AspNetCore.AbpSecurityStampValidatorCallback; |
|||
|
|||
namespace Volo.Abp.Identity.AspNetCore; |
|||
|
|||
public static class SecurityStampValidatorOptionsExtensions |
|||
{ |
|||
public static SecurityStampValidatorOptions UpdatePrincipal(this SecurityStampValidatorOptions options) |
|||
{ |
|||
var previousOnRefreshingPrincipal = options.OnRefreshingPrincipal; |
|||
options.OnRefreshingPrincipal = async context => |
|||
{ |
|||
await SecurityStampValidatorCallback.UpdatePrincipal(context); |
|||
await previousOnRefreshingPrincipal?.Invoke(context); |
|||
}; |
|||
return options; |
|||
} |
|||
} |
|||
Loading…
Reference in new issue