Skip to content

Commit be0b9e4

Browse files
HaoKJohn Luo
andauthored
Update System.IdentityModel.Tokens.Jwt to 6.6 (#22846)
* Update System.IdentityModel.Tokens.Jwt to 6.6 * Update Versions.props * Add newtonsoft refs * Update OIDC instructions * Fixup JwtBearerSample TFM Co-authored-by: John Luo <[email protected]>
1 parent a93ff60 commit be0b9e4

File tree

6 files changed

+16
-12
lines changed

6 files changed

+16
-12
lines changed

eng/Versions.props

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,16 +189,16 @@
189189
<MicrosoftCodeAnalysisCSharpPackageVersion>3.4.0</MicrosoftCodeAnalysisCSharpPackageVersion>
190190
<MicrosoftCodeAnalysisCSharpWorkspacesPackageVersion>3.4.0</MicrosoftCodeAnalysisCSharpWorkspacesPackageVersion>
191191
<MicrosoftIdentityModelClientsActiveDirectoryPackageVersion>3.19.8</MicrosoftIdentityModelClientsActiveDirectoryPackageVersion>
192-
<MicrosoftIdentityModelLoggingPackageVersion>5.5.0</MicrosoftIdentityModelLoggingPackageVersion>
193-
<MicrosoftIdentityModelProtocolsOpenIdConnectPackageVersion>5.5.0</MicrosoftIdentityModelProtocolsOpenIdConnectPackageVersion>
194-
<MicrosoftIdentityModelProtocolsWsFederationPackageVersion>5.5.0</MicrosoftIdentityModelProtocolsWsFederationPackageVersion>
192+
<MicrosoftIdentityModelLoggingPackageVersion>6.6.0</MicrosoftIdentityModelLoggingPackageVersion>
193+
<MicrosoftIdentityModelProtocolsOpenIdConnectPackageVersion>6.6.0</MicrosoftIdentityModelProtocolsOpenIdConnectPackageVersion>
194+
<MicrosoftIdentityModelProtocolsWsFederationPackageVersion>6.6.0</MicrosoftIdentityModelProtocolsWsFederationPackageVersion>
195195
<MicrosoftInternalAspNetCoreH2SpecAllPackageVersion>2.2.1</MicrosoftInternalAspNetCoreH2SpecAllPackageVersion>
196196
<MicrosoftNETCoreWindowsApiSetsPackageVersion>1.0.1</MicrosoftNETCoreWindowsApiSetsPackageVersion>
197197
<MicrosoftOwinSecurityCookiesPackageVersion>3.0.1</MicrosoftOwinSecurityCookiesPackageVersion>
198198
<MicrosoftOwinTestingPackageVersion>3.0.1</MicrosoftOwinTestingPackageVersion>
199199
<MicrosoftWebAdministrationPackageVersion>11.1.0</MicrosoftWebAdministrationPackageVersion>
200200
<MicrosoftWebXdtPackageVersion>1.4.0</MicrosoftWebXdtPackageVersion>
201-
<SystemIdentityModelTokensJwtPackageVersion>5.5.0</SystemIdentityModelTokensJwtPackageVersion>
201+
<SystemIdentityModelTokensJwtPackageVersion>6.6.0</SystemIdentityModelTokensJwtPackageVersion>
202202
<!-- Packages from 2.1/2.2 branches used for site extension build -->
203203
<MicrosoftAspNetCoreAzureAppServicesSiteExtension21PackageVersion>2.1.1</MicrosoftAspNetCoreAzureAppServicesSiteExtension21PackageVersion>
204204
<MicrosoftAspNetCoreAzureAppServicesSiteExtension22PackageVersion>2.2.0</MicrosoftAspNetCoreAzureAppServicesSiteExtension22PackageVersion>

src/MusicStore/samples/MusicStore/MusicStore.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
<Reference Include="Microsoft.Extensions.Configuration.CommandLine" />
3636
<!-- Avoid CS1705 errors due to mix of assemblies brought in transitively. -->
3737
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
38+
<Reference Include="Newtonsoft.Json" />
3839
</ItemGroup>
3940

4041
<Target Name="VerifyPrecompiledViews" AfterTargets="Publish">

src/Security/Authentication/JwtBearer/samples/JwtBearerSample/JwtBearerSample.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFrameworks>$(DefaultNetCoreTargetFramework)</TargetFrameworks>
4+
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
55
<UserSecretsId>aspnet5-JwtBearerSample-20151210102827</UserSecretsId>
66
<AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>
77
</PropertyGroup>

src/Security/Authentication/OpenIdConnect/samples/OpenIdConnectSample/OpenIdConnectSample.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFrameworks>$(DefaultNetCoreTargetFramework)</TargetFrameworks>
4+
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
55
<UserSecretsId>aspnet5-OpenIdConnectSample-20151210110318</UserSecretsId>
66
<AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>
77
</PropertyGroup>

src/Security/Authentication/OpenIdConnect/samples/OpenIdConnectSample/Readme.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# How to set up the sample locally
22

3-
The OpenIdConnect sample supports multilpe authentication providers. In these instruction, we will explore how to set up this sample with both Azure Active Directory and Google Identity Platform.
3+
The OpenIdConnect sample supports multiple authentication providers. In these instruction, we will explore how to set up this sample with both Azure Active Directory and Google Identity Platform.
44

55
## Determine your development environment and a few key variables
66

@@ -14,19 +14,21 @@ If the application is run from command line or terminal, environment variable AS
1414

1515
1. Set up a new Azure Active Directory (AAD) in your Azure Subscription.
1616
2. Open the newly created AAD in Azure web portal.
17-
3. Navigate to the Applications tab.
17+
3. Navigate to the App registrations tab.
1818
4. Add a new Application to the AAD. Set the "Sign-on URL" to sample application's URL.
19-
5. Naigate to the Application, and click the Configure tab.
19+
5. Navigate to the Application, and click the Configure tab.
2020
6. Find and save the "Client Id".
2121
7. Add a new key in the "Keys" section. Save value of the key, which is the "Client Secret".
2222
8. Click the "View Endpoints" on the drawer, a dialog will shows six endpoint URLs. Copy the "OAuth 2.0 Authorization Endpoint" to a text editor and remove the "/oauth2/authorize" from the string. The remaining part is the __authority URL__. It looks like `https://login.microsoftonline.com/<guid>`.
23+
9. Click the Authentication tab and check (i.e. enable) the ID tokens option under "Implicit grant".
24+
10. On the Authentication tab, ensure the "Redirect URIs" is set to `https://localhost:44318/signin-oidc` (i.e. the sample application's URI appended with "/signin-oidc")
2325

24-
### Configure with Google Identity Platform
26+
### Configure with Google Identity Platform
2527

2628
1. Create a new project through [Google APIs](https://console.developers.google.com).
2729
2. In the sidebar choose "Credentials".
2830
3. Navigate to "OAuth consent screen" tab, fill in the project name and save.
29-
4. Navigate to "Credentials" tab. Click "Create credentials". Choose "OAuth client ID".
31+
4. Navigate to "Credentials" tab. Click "Create credentials". Choose "OAuth client ID".
3032
5. Select "Web application" as the application type. Fill in the "Authorized redirect URIs" with `https://localhost:44318/signin-oidc`.
3133
6. Save the "Client ID" and "Client Secret" shown in the dialog.
3234
7. The "Authority URL" for Google Authentication is `https://accounts.google.com/`.
@@ -41,4 +43,4 @@ dotnet user-secrets set oidc:clientid <Client Id>
4143
dotnet user-secrets set oidc:clientsecret <Client Secret>
4244
dotnet user-secrets set oidc:authority <Authority URL>
4345
```
44-
46+
3. Update the call to `AddOpenIdConnect()` in `ConfigureServices` to use the configuration values from user secrets.

src/SignalR/clients/ts/FunctionalTests/SignalR.Client.FunctionalTestApp.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
<Reference Include="Microsoft.AspNetCore.StaticFiles" />
3535
<Reference Include="Microsoft.Extensions.Logging.Console" />
3636
<Reference Include="Microsoft.Extensions.Logging.Debug" />
37+
<Reference Include="Newtonsoft.Json" />
3738
<Reference Include="System.Reactive.Linq" />
3839
<!-- Avoid CS1705 errors due to mix of assemblies brought in transitively. -->
3940
<Reference Include="Microsoft.AspNetCore.SignalR.Common" />

0 commit comments

Comments
 (0)