Пример #1
0
        public async Task <ClaimsIdentity> GenerateUserIdentityAsync(SiriusUserManager manager)
        {
            ClaimsIdentity userIdentity = await manager.CreateIdentityAsync(this, DefaultAuthenticationTypes.ApplicationCookie);

            userIdentity.AddClaim(new Claim("UserId", this.Id));
            userIdentity.AddClaim(new Claim("UserOrganizationId", this.OrganizationId.ToString()));
            userIdentity.AddClaim(new Claim("UserFirstName", this.FirstName ?? ""));
            userIdentity.AddClaim(new Claim("UserLastName", this.LastName ?? ""));
            userIdentity.AddClaim(new Claim("StaffUserName", this.StaffUserName));
            return(userIdentity);
        }
Пример #2
0
        public async Task <ClaimsIdentity> GenerateUserIdentityAsync(SiriusUserManager manager)
        {
            var userIdentity = await manager.CreateIdentityAsync(this, DefaultAuthenticationTypes.ApplicationCookie);

            return(userIdentity);
        }