26 lines
		
	
	
		
			750 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			750 B
		
	
	
	
		
			C#
		
	
	
	
	
	
| using System.Collections.Generic;
 | |
| using System.Security.Claims;
 | |
| using Volo.Abp.DependencyInjection;
 | |
| using Volo.Abp.Security.Claims;
 | |
| 
 | |
| namespace KonSoft.TenantManagement.Security;
 | |
| 
 | |
| [Dependency(ReplaceServices = true)]
 | |
| public class FakeCurrentPrincipalAccessor : ThreadCurrentPrincipalAccessor
 | |
| {
 | |
|     protected override ClaimsPrincipal GetClaimsPrincipal()
 | |
|     {
 | |
|         return GetPrincipal();
 | |
|     }
 | |
| 
 | |
|     private ClaimsPrincipal GetPrincipal()
 | |
|     {
 | |
|         return new ClaimsPrincipal(new ClaimsIdentity(new List<Claim>
 | |
|         {
 | |
|             new Claim(AbpClaimTypes.UserId, "2e701e62-0953-4dd3-910b-dc6cc93ccb0d"),
 | |
|             new Claim(AbpClaimTypes.UserName, "admin"),
 | |
|             new Claim(AbpClaimTypes.Email, "admin@abp.io")
 | |
|         }));
 | |
|     }
 | |
| }
 |