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,18 @@ | ||||
| using Ablera.Serdica.Authentication.Models; | ||||
| using Ablera.Serdica.Common.Tools.Extensions; | ||||
| using Microsoft.AspNetCore.Http; | ||||
| using System.Text.Json; | ||||
| using System.Threading.Tasks; | ||||
|  | ||||
| namespace Ablera.Serdica.Authentication.Extensions; | ||||
|  | ||||
| public static class ProxyResultExtension | ||||
| { | ||||
|     public static async Task ReturnHttpRessponse(this ProxyResult proxyResult, HttpResponse httpResponse) | ||||
|     { | ||||
|         if (httpResponse.HasStarted) return; | ||||
|         httpResponse.StatusCode = (int)proxyResult.StatusCode; | ||||
|         httpResponse.ContentType = "application/json"; | ||||
|         await JsonSerializer.SerializeAsync(httpResponse.Body, proxyResult, proxyResult.GetType(), GlobalJsonSerializerOptions.JsonSerializerOptions); | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user