From 6f6545c149d98b299b5a77353e003a34c13b3ba8 Mon Sep 17 00:00:00 2001 From: Ali Yousefi Date: Sat, 25 Nov 2023 19:11:42 +0330 Subject: [PATCH] update auth client --- .../EasyMicroservices.Cores.AspCore.Tests.csproj | 8 ++------ .../EasyMicroservices.Cores.AspCoreApi.csproj | 4 ++-- ...syMicroservices.Cores.AspEntityFrameworkCoreApi.csproj | 2 +- .../CoreSwaggerClientBase.cs | 7 ++++--- .../EasyMicroservices.Cores.Clients.csproj | 2 +- .../EasyMicroservices.Cores.Contracts.csproj | 2 +- .../EasyMicroservices.Cores.Database.csproj | 2 +- .../EasyMicroservices.Cores.EntityFrameworkCore.csproj | 2 +- ...roservices.Cores.Relational.EntityFrameworkCore.csproj | 2 +- 9 files changed, 14 insertions(+), 17 deletions(-) diff --git a/src/CSharp/EasyMicroservices.Cores.AspCore.Tests/EasyMicroservices.Cores.AspCore.Tests.csproj b/src/CSharp/EasyMicroservices.Cores.AspCore.Tests/EasyMicroservices.Cores.AspCore.Tests.csproj index 7b0f22a..87b852a 100644 --- a/src/CSharp/EasyMicroservices.Cores.AspCore.Tests/EasyMicroservices.Cores.AspCore.Tests.csproj +++ b/src/CSharp/EasyMicroservices.Cores.AspCore.Tests/EasyMicroservices.Cores.AspCore.Tests.csproj @@ -20,11 +20,13 @@ + + @@ -32,10 +34,4 @@ - - - 7.0.14 - - - diff --git a/src/CSharp/EasyMicroservices.Cores.AspCoreApi/EasyMicroservices.Cores.AspCoreApi.csproj b/src/CSharp/EasyMicroservices.Cores.AspCoreApi/EasyMicroservices.Cores.AspCoreApi.csproj index 516940c..ae81c82 100644 --- a/src/CSharp/EasyMicroservices.Cores.AspCoreApi/EasyMicroservices.Cores.AspCoreApi.csproj +++ b/src/CSharp/EasyMicroservices.Cores.AspCoreApi/EasyMicroservices.Cores.AspCoreApi.csproj @@ -4,7 +4,7 @@ net6.0;net7.0;net8.0 AnyCPU;x64;x86 EasyMicroservices - 0.0.0.51 + 0.0.0.52 asp core servces. EasyMicroservices@gmail.com core,cores,base,database,services,asp,aspnet @@ -25,7 +25,7 @@ - + diff --git a/src/CSharp/EasyMicroservices.Cores.AspEntityFrameworkCoreApi/EasyMicroservices.Cores.AspEntityFrameworkCoreApi.csproj b/src/CSharp/EasyMicroservices.Cores.AspEntityFrameworkCoreApi/EasyMicroservices.Cores.AspEntityFrameworkCoreApi.csproj index 6dd8c81..ab7db8f 100644 --- a/src/CSharp/EasyMicroservices.Cores.AspEntityFrameworkCoreApi/EasyMicroservices.Cores.AspEntityFrameworkCoreApi.csproj +++ b/src/CSharp/EasyMicroservices.Cores.AspEntityFrameworkCoreApi/EasyMicroservices.Cores.AspEntityFrameworkCoreApi.csproj @@ -4,7 +4,7 @@ net6.0;net7.0;net8.0 AnyCPU;x64;x86 EasyMicroservices - 0.0.0.51 + 0.0.0.52 asp core servces. EasyMicroservices@gmail.com core,cores,base,database,services,asp,aspnet,aspcore,efcore diff --git a/src/CSharp/EasyMicroservices.Cores.Clients/CoreSwaggerClientBase.cs b/src/CSharp/EasyMicroservices.Cores.Clients/CoreSwaggerClientBase.cs index 41a9dcc..4bc9388 100644 --- a/src/CSharp/EasyMicroservices.Cores.Clients/CoreSwaggerClientBase.cs +++ b/src/CSharp/EasyMicroservices.Cores.Clients/CoreSwaggerClientBase.cs @@ -29,9 +29,10 @@ public void SetBearerToken(string token) /// protected Task CreateHttpRequestMessageAsync(CancellationToken cancellationToken) { - var msg = new HttpRequestMessage(); - msg.Headers.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", BearerToken); - return Task.FromResult(msg); + var requestMesasge = new HttpRequestMessage(); + if (BearerToken != null) + requestMesasge.Headers.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", BearerToken); + return Task.FromResult(requestMesasge); } } } diff --git a/src/CSharp/EasyMicroservices.Cores.Clients/EasyMicroservices.Cores.Clients.csproj b/src/CSharp/EasyMicroservices.Cores.Clients/EasyMicroservices.Cores.Clients.csproj index 79c633e..9ee7ccb 100644 --- a/src/CSharp/EasyMicroservices.Cores.Clients/EasyMicroservices.Cores.Clients.csproj +++ b/src/CSharp/EasyMicroservices.Cores.Clients/EasyMicroservices.Cores.Clients.csproj @@ -4,7 +4,7 @@ netstandard2.0;netstandard2.1;net6.0;net8.0 AnyCPU;x64;x86 EasyMicroservices - 0.0.0.51 + 0.0.0.52 core of database. EasyMicroservices@gmail.com core,cores,base,client,clients diff --git a/src/CSharp/EasyMicroservices.Cores.Contracts/EasyMicroservices.Cores.Contracts.csproj b/src/CSharp/EasyMicroservices.Cores.Contracts/EasyMicroservices.Cores.Contracts.csproj index ee0d2bd..8bc4c99 100644 --- a/src/CSharp/EasyMicroservices.Cores.Contracts/EasyMicroservices.Cores.Contracts.csproj +++ b/src/CSharp/EasyMicroservices.Cores.Contracts/EasyMicroservices.Cores.Contracts.csproj @@ -4,7 +4,7 @@ netstandard2.0;netstandard2.1;net45;net6.0;net8.0 AnyCPU;x64;x86 EasyMicroservices - 0.0.0.51 + 0.0.0.52 core contracts. EasyMicroservices@gmail.com core,cores,base,contract,contracts,dto,dtos diff --git a/src/CSharp/EasyMicroservices.Cores.Database/EasyMicroservices.Cores.Database.csproj b/src/CSharp/EasyMicroservices.Cores.Database/EasyMicroservices.Cores.Database.csproj index b520e66..cea40b4 100644 --- a/src/CSharp/EasyMicroservices.Cores.Database/EasyMicroservices.Cores.Database.csproj +++ b/src/CSharp/EasyMicroservices.Cores.Database/EasyMicroservices.Cores.Database.csproj @@ -4,7 +4,7 @@ netstandard2.0;netstandard2.1;net45;net6.0;net8.0 AnyCPU;x64;x86 EasyMicroservices - 0.0.0.51 + 0.0.0.52 core of database. EasyMicroservices@gmail.com core,cores,base,database diff --git a/src/CSharp/EasyMicroservices.Cores.EntityFrameworkCore/EasyMicroservices.Cores.EntityFrameworkCore.csproj b/src/CSharp/EasyMicroservices.Cores.EntityFrameworkCore/EasyMicroservices.Cores.EntityFrameworkCore.csproj index 79ecb4c..d1f4147 100644 --- a/src/CSharp/EasyMicroservices.Cores.EntityFrameworkCore/EasyMicroservices.Cores.EntityFrameworkCore.csproj +++ b/src/CSharp/EasyMicroservices.Cores.EntityFrameworkCore/EasyMicroservices.Cores.EntityFrameworkCore.csproj @@ -4,7 +4,7 @@ net6.0;net8.0 AnyCPU;x64;x86 EasyMicroservices - 0.0.0.51 + 0.0.0.52 ef core of database. EasyMicroservices@gmail.com core,cores,base,database,ef,efcore diff --git a/src/CSharp/EasyMicroservices.Cores.Relational.EntityFrameworkCore/EasyMicroservices.Cores.Relational.EntityFrameworkCore.csproj b/src/CSharp/EasyMicroservices.Cores.Relational.EntityFrameworkCore/EasyMicroservices.Cores.Relational.EntityFrameworkCore.csproj index ec83cac..51e23a2 100644 --- a/src/CSharp/EasyMicroservices.Cores.Relational.EntityFrameworkCore/EasyMicroservices.Cores.Relational.EntityFrameworkCore.csproj +++ b/src/CSharp/EasyMicroservices.Cores.Relational.EntityFrameworkCore/EasyMicroservices.Cores.Relational.EntityFrameworkCore.csproj @@ -4,7 +4,7 @@ net6.0;net8.0 AnyCPU;x64;x86 EasyMicroservices - 0.0.0.51 + 0.0.0.52 ef core of Relational database. EasyMicroservices@gmail.com core,cores,base,database,ef,efcore,Relational