Skip to content

Commit 76050df

Browse files
committed
Revert "Upgrade console client net5"
This reverts commit eb40ce7.
1 parent 30995ca commit 76050df

File tree

5 files changed

+15
-16
lines changed

5 files changed

+15
-16
lines changed

1-src/console.oauth2.client.resource-owner-password-credentials/console.oauth2.client.resource-owner-password-credentials.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net5.0</TargetFramework>
4+
<TargetFramework>netcoreapp3.1</TargetFramework>
55
<OutputType>Exe</OutputType>
66
<AssemblyName>Console.OAuth2.Client.ResourceOwnerPasswordCredentials</AssemblyName>
77
<RootNamespace>ResourceOwnerPasswordCredentials</RootNamespace>
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="IdentityModel" Version="5.1.0" />
11+
<PackageReference Include="IdentityModel" Version="4.3.1" />
1212
</ItemGroup>
1313

1414
<ItemGroup>

1-src/console.oidc.client.client-credentials/Program.cs

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33
using System.Diagnostics;
44
using System.Net.Http;
@@ -59,13 +59,16 @@ private static async Task<TokenResponse> GetTokenAsync()
5959
}
6060
});
6161

62-
return await httpClient.RequestClientCredentialsTokenAsync(new ClientCredentialsTokenRequest
62+
return await httpClient.RequestTokenAsync(new TokenRequest
6363
{
6464
Address = discoveryResponse.TokenEndpoint,
6565
ClientId = "client-credentials-client",
6666
ClientSecret = "lnh",
6767
GrantType = "client_credentials",
68-
Scope= "api-1 api-2 api-3"
68+
Parameters =
69+
{
70+
["scope"]="api-1 api-2 api-3"
71+
}
6972
});
7073
}
7174
}

1-src/console.oidc.client.client-credentials/console.oauth2.client.client-credentials.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net5.0</TargetFramework>
4+
<TargetFramework>netcoreapp3.1</TargetFramework>
55
<OutputType>Exe</OutputType>
66
<AssemblyName>Console.OAuth2.Client.ClientCredentials</AssemblyName>
77
<RootNamespace>ClientCredentials</RootNamespace>
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="IdentityModel" Version="5.1.0" />
11+
<PackageReference Include="IdentityModel" Version="4.3.1" />
1212
</ItemGroup>
1313

1414
<ItemGroup>

1-src/http.diagnostic/HttpDefaultObserver.cs

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33
using System.Net.Http;
44
using Newtonsoft.Json.Linq;
@@ -30,10 +30,6 @@ public void OnNext(KeyValuePair<string, object> value)
3030
private void LogHttp(HttpResponseMessage httpResponseMessage)
3131
{
3232
var color = ConsoleColor.Green;
33-
if (httpResponseMessage==null)
34-
{
35-
return;
36-
}
3733
if (httpResponseMessage.IsSuccessStatusCode == false)
3834
{
3935
color = ConsoleColor.Red;
@@ -89,4 +85,4 @@ private void LogLine(Object value, ConsoleColor color)
8985
Console.ForegroundColor = oldColor;
9086
}
9187
}
92-
}
88+
}

1-src/http.diagnostic/http.diagnostic.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
11-
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="5.0.1" />
10+
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
11+
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="4.7.1" />
1212
</ItemGroup>
1313

1414
</Project>

0 commit comments

Comments
 (0)