up
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				Build Test Deploy / build-test (push) Has been cancelled
				
			
		
			
				
	
				Build Test Deploy / authority-container (push) Has been cancelled
				
			
		
			
				
	
				Build Test Deploy / docs (push) Has been cancelled
				
			
		
			
				
	
				Build Test Deploy / deploy (push) Has been cancelled
				
			
		
			
				
	
				Docs CI / lint-and-preview (push) Has been cancelled
				
			
		
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	Build Test Deploy / build-test (push) Has been cancelled
				
			Build Test Deploy / authority-container (push) Has been cancelled
				
			Build Test Deploy / docs (push) Has been cancelled
				
			Build Test Deploy / deploy (push) Has been cancelled
				
			Docs CI / lint-and-preview (push) Has been cancelled
				
			This commit is contained in:
		| @@ -0,0 +1,16 @@ | ||||
| using System.Security.Claims; | ||||
| using OpenIddict.Abstractions; | ||||
| using static OpenIddict.Abstractions.OpenIddictConstants; | ||||
|  | ||||
| namespace Ablera.Serdica.Authentication.Extensions; | ||||
|  | ||||
| public static class PrincipalBuilder | ||||
| { | ||||
|     public static ClaimsPrincipal Build(string clientId, string authenticationSchema) | ||||
|     { | ||||
|         var claimsIdentity = new ClaimsIdentity(authenticationSchema); | ||||
|         claimsIdentity.AddClaim(Claims.Subject, clientId, Destinations.AccessToken); | ||||
|         var claimsPrincipal = new ClaimsPrincipal(claimsIdentity); | ||||
|         return claimsPrincipal; | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user