public static void CapEventBusReSetClaim(this IGirvsClaimManager claimManager, CapHeader capHeader) { var claimdic = capHeader.ToDictionary(x => x.Key, v => v.Value); claimdic.SetDictionaryKeyValue(GirvsIdentityClaimTypes.IdentityType, IdentityType.EventMessageUser.ToString()); claimManager.SetFromDictionary(claimdic); }
public static UserType GetUserType(this IGirvsClaimManager claimManager) { var userTypeStr = claimManager.IdentityClaim[GirvsIdentityUserTypeClaimTypes]; if (string.IsNullOrEmpty(userTypeStr)) { return(UserType.All); } return((UserType)Enum.Parse(typeof(UserType), userTypeStr)); }