forked from FarmMaps/FarmMapsApiClient
		
	Seperated eventhub service from api service.
wip nbs flow. Changed uploading a bit.
This commit is contained in:
		@@ -10,12 +10,12 @@ namespace FarmmapsApi.HttpMessageHandlers
 | 
			
		||||
    {
 | 
			
		||||
        protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
 | 
			
		||||
        {
 | 
			
		||||
            if (!request.Headers.Authorization.Scheme.Equals(OidcConstants.AuthenticationSchemes.AuthorizationHeaderBearer) ||
 | 
			
		||||
                string.IsNullOrEmpty(request.Headers.Authorization.Parameter))
 | 
			
		||||
            if (!OidcConstants.AuthenticationSchemes.AuthorizationHeaderBearer.Equals(request.Headers?.Authorization.Scheme) ||
 | 
			
		||||
                string.IsNullOrEmpty(request.Headers?.Authorization.Parameter))
 | 
			
		||||
            {
 | 
			
		||||
                return new HttpResponseMessage(HttpStatusCode.Unauthorized)
 | 
			
		||||
                {
 | 
			
		||||
                    Content = new StringContent("You must authenticate before using the API")
 | 
			
		||||
                    Content = new StringContent("You must authenticated before using the API")
 | 
			
		||||
                };
 | 
			
		||||
            }
 | 
			
		||||
            return await base.SendAsync(request, cancellationToken);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user