添加在线用户管理,同一账号只允许一台设备登陆。
后期可限制登陆用户人数等功能
This commit is contained in:
1 parent
c67f0fb317
commit
6f38757a3f
10 files changed
+189
-7
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))
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user