Skip to content

Commit 68fc729

Browse files
committed
chore(deps): rename IdentityModel to Duende.IdentityModel
1 parent 40a7f4a commit 68fc729

File tree

191 files changed

+581
-582
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

191 files changed

+581
-582
lines changed
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<Project>
22

3-
<PropertyGroup>
4-
<AspNetVersion>3.1.0</AspNetVersion>
5-
</PropertyGroup>
3+
<PropertyGroup>
4+
<AspNetVersion>3.1.0</AspNetVersion>
5+
</PropertyGroup>
66

7-
<ItemGroup>
8-
<PackageReference Update="IdentityModel" Version="4.3.0" />
9-
10-
<PackageReference Update="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="$(AspNetVersion)" />
11-
<PackageReference Update="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="$(AspNetVersion)" />
12-
<PackageReference Update="Microsoft.AspNetCore.Authentication.JwtBearer" Version="$(AspNetVersion)" />
13-
<PackageReference Update="Microsoft.AspNetCore.Authentication.Certificate" Version="$(AspNetVersion)"/>
14-
15-
<PackageReference Update="System.IdentityModel.Tokens.Jwt" Version="5.6.0" />
16-
</ItemGroup>
7+
<ItemGroup>
8+
<PackageReference Update="Duende.IdentityModel" Version="4.3.0" />
9+
10+
<PackageReference Update="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="$(AspNetVersion)" />
11+
<PackageReference Update="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="$(AspNetVersion)" />
12+
<PackageReference Update="Microsoft.AspNetCore.Authentication.JwtBearer" Version="$(AspNetVersion)" />
13+
<PackageReference Update="Microsoft.AspNetCore.Authentication.Certificate" Version="$(AspNetVersion)" />
14+
15+
<PackageReference Update="System.IdentityModel.Tokens.Jwt" Version="5.6.0" />
16+
</ItemGroup>
1717
</Project>

samples/Clients/old/MvcHybrid/Startup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using Microsoft.AspNetCore.Builder;
33
using Microsoft.Extensions.DependencyInjection;
44
using System.IdentityModel.Tokens.Jwt;
5-
using IdentityModel;
5+
using Duende.IdentityModel;
66
using Clients;
77
using Microsoft.IdentityModel.Tokens;
88
using Microsoft.AspNetCore.Authentication.Cookies;

samples/Clients/old/MvcHybridAutomaticRefresh/Startup.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using Microsoft.AspNetCore.Builder;
33
using Microsoft.Extensions.DependencyInjection;
44
using System.IdentityModel.Tokens.Jwt;
5-
using IdentityModel;
5+
using Duende.IdentityModel;
66
using Clients;
77
using Microsoft.IdentityModel.Tokens;
88
using Microsoft.AspNetCore.Authentication.Cookies;
@@ -50,7 +50,7 @@ public void ConfigureServices(IServiceCollection services)
5050
options.Scope.Add("email");
5151
options.Scope.Add("api1");
5252
options.Scope.Add("offline_access");
53-
53+
5454
options.ClaimActions.MapAllExcept("iss", "nbf", "exp", "aud", "nonce", "iat", "c_hash");
5555

5656
options.GetClaimsFromUserInfoEndpoint = true;

samples/Clients/old/MvcImplicit/Startup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using Clients;
2-
using IdentityModel;
2+
using Duende.IdentityModel;
33
using Microsoft.AspNetCore.Authentication.Cookies;
44
using Microsoft.AspNetCore.Builder;
55
using Microsoft.Extensions.DependencyInjection;

samples/Clients/old/MvcImplicitJwtRequest/Startup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using Clients;
2-
using IdentityModel;
2+
using Duende.IdentityModel;
33
using Microsoft.AspNetCore.Builder;
44
using Microsoft.Extensions.DependencyInjection;
55
using Microsoft.IdentityModel.Tokens;

samples/Clients/old/MvcManual/Controllers/HomeController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using System.Linq;
77
using Microsoft.IdentityModel.Tokens;
88
using System.Collections.Generic;
9-
using IdentityModel;
9+
using Duende.IdentityModel;
1010
using System.Security.Cryptography;
1111
using System.IdentityModel.Tokens.Jwt;
1212
using Clients;
@@ -32,7 +32,7 @@ public async Task<IActionResult> Secure()
3232
return await StartAuthentication();
3333
}
3434

35-
public async Task <IActionResult> Logout()
35+
public async Task<IActionResult> Logout()
3636
{
3737
await HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
3838

samples/Clients/src/ConsoleDeviceFlow/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using Clients;
2-
using IdentityModel;
2+
using Duende.IdentityModel;
33
using IdentityModel.Client;
44
using Newtonsoft.Json.Linq;
55
using System;

samples/Clients/src/ConsoleEphemeralMtlsClient/Program.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using System.Security.Cryptography.X509Certificates;
66
using System.Threading.Tasks;
77
using Clients;
8-
using IdentityModel;
8+
using Duende.IdentityModel;
99
using IdentityModel.Client;
1010
using Newtonsoft.Json.Linq;
1111

@@ -14,18 +14,18 @@ namespace ConsoleEphemeralMtlsClient
1414
class Program
1515
{
1616
private static X509Certificate2 ClientCertificate;
17-
17+
1818
static async Task Main(string[] args)
1919
{
2020
ClientCertificate = CreateClientCertificate("client");
21-
21+
2222
var response = await RequestTokenAsync();
2323
response.Show();
2424

2525
Console.ReadLine();
2626
await CallServiceAsync(response.AccessToken);
2727
}
28-
28+
2929
static async Task<TokenResponse> RequestTokenAsync()
3030
{
3131
var client = new HttpClient(GetHandler(ClientCertificate));
@@ -37,7 +37,7 @@ static async Task<TokenResponse> RequestTokenAsync()
3737
.TryGetValue(OidcConstants.Discovery.MtlsEndpointAliases)
3838
.Value<string>(OidcConstants.Discovery.TokenEndpoint)
3939
.ToString();
40-
40+
4141
var response = await client.RequestClientCredentialsTokenAsync(new ClientCredentialsTokenRequest
4242
{
4343
Address = endpoint,
@@ -64,17 +64,17 @@ static async Task CallServiceAsync(string token)
6464
"\n\nService claims:".ConsoleGreen();
6565
Console.WriteLine(JArray.Parse(response));
6666
}
67-
67+
6868
static X509Certificate2 CreateClientCertificate(string name)
6969
{
7070
X500DistinguishedName distinguishedName = new X500DistinguishedName($"CN={name}");
7171

7272
using (var rsa = RSA.Create(2048))
7373
{
74-
var request = new CertificateRequest(distinguishedName, rsa, HashAlgorithmName.SHA256,RSASignaturePadding.Pkcs1);
74+
var request = new CertificateRequest(distinguishedName, rsa, HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1);
7575

7676
request.CertificateExtensions.Add(
77-
new X509KeyUsageExtension(X509KeyUsageFlags.DataEncipherment | X509KeyUsageFlags.KeyEncipherment | X509KeyUsageFlags.DigitalSignature , false));
77+
new X509KeyUsageExtension(X509KeyUsageFlags.DataEncipherment | X509KeyUsageFlags.KeyEncipherment | X509KeyUsageFlags.DigitalSignature, false));
7878

7979
request.CertificateExtensions.Add(
8080
new X509EnhancedKeyUsageExtension(
@@ -83,7 +83,7 @@ static X509Certificate2 CreateClientCertificate(string name)
8383
return request.CreateSelfSigned(new DateTimeOffset(DateTime.UtcNow.AddDays(-1)), new DateTimeOffset(DateTime.UtcNow.AddDays(3650)));
8484
}
8585
}
86-
86+
8787
static SocketsHttpHandler GetHandler(X509Certificate2 certificate)
8888
{
8989
var handler = new SocketsHttpHandler

samples/Clients/src/ConsoleMTLSClient/Program.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using Clients;
2-
using IdentityModel;
2+
using Duende.IdentityModel;
33
using IdentityModel.Client;
44
using Newtonsoft.Json.Linq;
55
using System;
@@ -34,7 +34,7 @@ static async Task<TokenResponse> RequestTokenAsync()
3434
.TryGetValue(OidcConstants.Discovery.MtlsEndpointAliases)
3535
.Value<string>(OidcConstants.Discovery.TokenEndpoint)
3636
.ToString();
37-
37+
3838
var response = await client.RequestClientCredentialsTokenAsync(new ClientCredentialsTokenRequest
3939
{
4040
Address = endpoint,
@@ -64,7 +64,7 @@ static async Task CallServiceAsync(string token)
6464
static SocketsHttpHandler GetHandler()
6565
{
6666
var handler = new SocketsHttpHandler();
67-
67+
6868
var cert = new X509Certificate2("client.p12", "changeit");
6969
handler.SslOptions.ClientCertificates = new X509CertificateCollection { cert };
7070

samples/Clients/src/ConsolePrivateKeyJwtClient/Program.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using Clients;
2-
using IdentityModel;
2+
using Duende.IdentityModel;
33
using IdentityModel.Client;
44
using Microsoft.IdentityModel.Tokens;
55
using System;
@@ -16,7 +16,7 @@ namespace ConsolePrivateKeyJwtClient
1616
public class Program
1717
{
1818
private static string rsaKey = "{'d':'GmiaucNIzdvsEzGjZjd43SDToy1pz-Ph-shsOUXXh-dsYNGftITGerp8bO1iryXh_zUEo8oDK3r1y4klTonQ6bLsWw4ogjLPmL3yiqsoSjJa1G2Ymh_RY_sFZLLXAcrmpbzdWIAkgkHSZTaliL6g57vA7gxvd8L4s82wgGer_JmURI0ECbaCg98JVS0Srtf9GeTRHoX4foLWKc1Vq6NHthzqRMLZe-aRBNU9IMvXNd7kCcIbHCM3GTD_8cFj135nBPP2HOgC_ZXI1txsEf-djqJj8W5vaM7ViKU28IDv1gZGH3CatoysYx6jv1XJVvb2PH8RbFKbJmeyUm3Wvo-rgQ','dp':'YNjVBTCIwZD65WCht5ve06vnBLP_Po1NtL_4lkholmPzJ5jbLYBU8f5foNp8DVJBdFQW7wcLmx85-NC5Pl1ZeyA-Ecbw4fDraa5Z4wUKlF0LT6VV79rfOF19y8kwf6MigyrDqMLcH_CRnRGg5NfDsijlZXffINGuxg6wWzhiqqE','dq':'LfMDQbvTFNngkZjKkN2CBh5_MBG6Yrmfy4kWA8IC2HQqID5FtreiY2MTAwoDcoINfh3S5CItpuq94tlB2t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"Console Client Credentials Flow with JWT Assertion";
@@ -35,7 +35,7 @@ public static async Task Main()
3535
var jwk = new JsonWebKey(rsaKey);
3636
response = await RequestTokenAsync(new SigningCredentials(jwk, "RS256"));
3737
response.Show();
38-
38+
3939
Console.ReadLine();
4040
await CallServiceAsync(response.AccessToken);
4141
}
@@ -47,7 +47,7 @@ static async Task<TokenResponse> RequestTokenAsync(SigningCredentials credential
4747
var disco = await client.GetDiscoveryDocumentAsync(Constants.Authority);
4848
if (disco.IsError) throw new Exception(disco.Error);
4949

50-
var clientToken = CreateClientToken(credential,"client.jwt", disco.TokenEndpoint);
50+
var clientToken = CreateClientToken(credential, "client.jwt", disco.TokenEndpoint);
5151

5252
var response = await client.RequestClientCredentialsTokenAsync(new ClientCredentialsTokenRequest
5353
{
@@ -83,7 +83,7 @@ static async Task CallServiceAsync(string token)
8383

8484
private static string CreateClientToken(SigningCredentials credential, string clientId, string audience)
8585
{
86-
86+
8787
var now = DateTime.UtcNow;
8888

8989
var token = new JwtSecurityToken(

0 commit comments

Comments
 (0)