添加在线用户管理,同一账号只允许一台设备登陆。
后期可限制登陆用户人数等功能
This commit is contained in:
1 parent
c67f0fb317
commit
a777e04e83
11 files changed
+192
-10
No files matched your search
@@ -15,7 +15,11 @@ namespace WalkingTec.Mvvm.Core.Extensions
|
||||
public static ClaimsPrincipal CreatePrincipal(this LoginUserInfo self)
|
||||
{
|
||||
if (string.IsNullOrEmpty(self.ITCode)) throw new ArgumentException("Id is mandatory", nameof(self.ITCode));
|
||||
var claims = new List<Claim> { new Claim(AuthConstants.JwtClaimTypes.Subject, self.ITCode) };
|
||||
var claims = new List<Claim>
|
||||
{
|
||||
new Claim(AuthConstants.JwtClaimTypes.Subject, self.ITCode) ,
|
||||
new Claim("SessionId", Guid.NewGuid().ToString())
|
||||
};
|
||||
|
||||
if (!string.IsNullOrEmpty(self.Name))
|
||||
{
|
||||
|
||||
@@ -12,11 +12,11 @@ namespace $namespace$
|
||||
[ActionDescription("$des$")]
|
||||
public partial class $modelname$Controller : BaseController
|
||||
{
|
||||
private readonly IUnitWork _unitwork;
|
||||
private readonly IUnitWork _unitWork;
|
||||
|
||||
public $modelname$Controller(IUnitWork unitwork)
|
||||
public $modelname$Controller(IUnitWork unitWork)
|
||||
{
|
||||
_unitwork = unitwork;
|
||||
_unitWork = unitWork;
|
||||
}
|
||||
|
||||
#region Search
|
||||
|
||||
Reference in new issue
Block a user