Skip to content

Commit 94506ae

Browse files
RolandGuijtRoland Guijt
andauthored
Upgrade to Duende.IdentityModel.OidcClient
* Update Maui example to use Duende.IdentityModel.OidcClient * Add required header --------- Co-authored-by: Roland Guijt <roland.guijt@gmail.com>
1 parent 525fad5 commit 94506ae

File tree

7 files changed

+25
-15
lines changed

7 files changed

+25
-15
lines changed

various/clients/Maui/MauiApp1/MauiApp1/MainPage.xaml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
using IdentityModel.Client;
2-
using IdentityModel.OidcClient;
1+
using Duende.IdentityModel.Client;
2+
using Duende.IdentityModel.OidcClient;
33
using System.Text;
44
using System.Text.Json;
55

various/clients/Maui/MauiApp1/MauiApp1/MauiApp1.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,10 @@
5757
</ItemGroup>
5858

5959
<ItemGroup>
60+
<PackageReference Include="Duende.IdentityModel.OidcClient" Version="6.0.1" />
6061
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
6162
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiVersion)" />
6263
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
63-
64-
<PackageReference Include="IdentityModel.OidcClient" Version="6.0.0-preview.2" />
6564
</ItemGroup>
6665

6766
</Project>

various/clients/Maui/MauiApp1/MauiApp1/MauiAuthenticationBrowser.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
using IdentityModel.Client;
2-
using IdentityModel.OidcClient.Browser;
1+
using Duende.IdentityModel.Client;
2+
using Duende.IdentityModel.OidcClient.Browser;
33

44
namespace MauiApp1;
55

6-
public class MauiAuthenticationBrowser : IdentityModel.OidcClient.Browser.IBrowser
6+
public class MauiAuthenticationBrowser : Duende.IdentityModel.OidcClient.Browser.IBrowser
77
{
88
public async Task<BrowserResult> InvokeAsync(BrowserOptions options, CancellationToken cancellationToken = default)
99
{
@@ -30,4 +30,4 @@ public async Task<BrowserResult> InvokeAsync(BrowserOptions options, Cancellatio
3030
};
3131
}
3232
}
33-
}
33+
}

various/clients/Maui/MauiApp1/MauiApp1/MauiProgram.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using IdentityModel.OidcClient;
1+
// Copyright (c) Duende Software. All rights reserved.
2+
// Licensed under the MIT License. See LICENSE in the project root for license information.
3+
4+
using Duende.IdentityModel.OidcClient;
25
using Microsoft.Extensions.Logging;
36

47
namespace MauiApp1;
@@ -16,7 +19,7 @@ public static MauiApp CreateMauiApp()
1619
});
1720

1821
#if DEBUG
19-
builder.Logging.AddDebug();
22+
builder.Logging.AddDebug();
2023
#endif
2124

2225
// setup OidcClient

various/clients/Maui/MauiApp1/MauiApp1/Platforms/Android/MainActivity.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
using Android.App;
1+
// Copyright (c) Duende Software. All rights reserved.
2+
// Licensed under the MIT License. See LICENSE in the project root for license information.
3+
4+
using Android.App;
25
using Android.Content.PM;
3-
using Android.OS;
46

57
namespace MauiApp1;
68
[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]

various/clients/Maui/MauiApp1/MauiApp1/Platforms/Android/MainApplication.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using Android.App;
1+
// Copyright (c) Duende Software. All rights reserved.
2+
// Licensed under the MIT License. See LICENSE in the project root for license information.
3+
4+
using Android.App;
25
using Android.Runtime;
36

47
namespace MauiApp1;

various/clients/Maui/MauiApp1/MauiApp1/Platforms/Android/WebAuthenticationCallbackActivity.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using Android.App;
1+
// Copyright (c) Duende Software. All rights reserved.
2+
// Licensed under the MIT License. See LICENSE in the project root for license information.
3+
4+
using Android.App;
25
using Android.Content.PM;
36

47
namespace YourNameSpace;
@@ -11,4 +14,4 @@ public class WebAuthenticationCallbackActivity : Microsoft.Maui.Authentication.W
1114
{
1215
const string CALLBACK_SCHEME = "myapp";
1316

14-
}
17+
}

0 commit comments

Comments
 (0)