diff --git a/Directory.Build.props b/Directory.Build.props index 33a9154d..b1467cd0 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -7,7 +7,7 @@ true preview true - $(NoWarn);CS1591;NU5118;NU5128;xUnit2002 + $(NoWarn);CS1591;NETSDK1206;NU5118;NU5128;xUnit2002 NU1901;NU1902;NU1903;NU1904 enable enable @@ -33,6 +33,31 @@ + + true + + true + + + true + net461; net472; @@ -45,19 +70,14 @@ net8.0 - - net8.0-ios + Condition=" '$(NetCoreIOSTargetFrameworks)' == '' And '$(SupportsIOSPlatformTargeting)' == 'true' "> + net8.0-ios12.0; + net8.0-ios13.0 - + net6.0-windows7.0; net6.0-windows10.0.17763; net7.0-windows7.0; @@ -71,18 +91,14 @@ netstandard2.1 - + Condition=" '$(UniversalWindowsPlatformTargetFrameworks)' == '' And '$(SupportsUniversalWindowsPlatformTargeting)' == 'true' "> uap10.0.17763 + + 12.0 + 7.0 + 7.0 @@ -115,6 +131,15 @@ $(_ComputedOfficialBuildId) + + false + false + false + false + false + false + + true true diff --git a/Directory.Build.targets b/Directory.Build.targets index 6c77786a..f9fcb2a1 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -130,6 +130,13 @@ $(DefineConstants);SUPPORTS_UIKIT + + $(DefineConstants);SUPPORTS_PRESENTATION_CONTEXT_PROVIDER + + + + diff --git a/OpenIddict.sln b/OpenIddict.sln index aaaaea70..b281b36c 100644 --- a/OpenIddict.sln +++ b/OpenIddict.sln @@ -157,6 +157,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenIddict.Sandbox.WinForms EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenIddict.Sandbox.Console.Client", "sandbox\OpenIddict.Sandbox.Console.Client\OpenIddict.Sandbox.Console.Client.csproj", "{819CD7AA-01FD-4369-BABF-5DFCB7E94068}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenIddict.Sandbox.Maui.Client", "sandbox\OpenIddict.Sandbox.Maui.Client\OpenIddict.Sandbox.Maui.Client.csproj", "{CD5EE836-ED56-48E3-B3B6-8D74C7C859B9}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -383,6 +385,12 @@ Global {819CD7AA-01FD-4369-BABF-5DFCB7E94068}.Debug|Any CPU.Build.0 = Debug|Any CPU {819CD7AA-01FD-4369-BABF-5DFCB7E94068}.Release|Any CPU.ActiveCfg = Release|Any CPU {819CD7AA-01FD-4369-BABF-5DFCB7E94068}.Release|Any CPU.Build.0 = Release|Any CPU + {CD5EE836-ED56-48E3-B3B6-8D74C7C859B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CD5EE836-ED56-48E3-B3B6-8D74C7C859B9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CD5EE836-ED56-48E3-B3B6-8D74C7C859B9}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {CD5EE836-ED56-48E3-B3B6-8D74C7C859B9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CD5EE836-ED56-48E3-B3B6-8D74C7C859B9}.Release|Any CPU.Build.0 = Release|Any CPU + {CD5EE836-ED56-48E3-B3B6-8D74C7C859B9}.Release|Any CPU.Deploy.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -443,6 +451,7 @@ Global {D0C56832-6557-4CC1-91EA-7B31B18BEE7A} = {F47D1283-0EE9-4728-8026-58405C29B786} {35997586-8AAB-4EE5-A022-3E5BD12746CE} = {F47D1283-0EE9-4728-8026-58405C29B786} {819CD7AA-01FD-4369-BABF-5DFCB7E94068} = {F47D1283-0EE9-4728-8026-58405C29B786} + {CD5EE836-ED56-48E3-B3B6-8D74C7C859B9} = {F47D1283-0EE9-4728-8026-58405C29B786} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {A710059F-0466-4D48-9B3A-0EF4F840B616} diff --git a/sandbox/OpenIddict.Sandbox.AspNetCore.Client/OpenIddict.Sandbox.AspNetCore.Client.csproj b/sandbox/OpenIddict.Sandbox.AspNetCore.Client/OpenIddict.Sandbox.AspNetCore.Client.csproj index f97b3a4b..93de5836 100644 --- a/sandbox/OpenIddict.Sandbox.AspNetCore.Client/OpenIddict.Sandbox.AspNetCore.Client.csproj +++ b/sandbox/OpenIddict.Sandbox.AspNetCore.Client/OpenIddict.Sandbox.AspNetCore.Client.csproj @@ -2,7 +2,6 @@ net48;net8.0 - false disable diff --git a/sandbox/OpenIddict.Sandbox.AspNetCore.Server/OpenIddict.Sandbox.AspNetCore.Server.csproj b/sandbox/OpenIddict.Sandbox.AspNetCore.Server/OpenIddict.Sandbox.AspNetCore.Server.csproj index 07d99588..bea71b8c 100644 --- a/sandbox/OpenIddict.Sandbox.AspNetCore.Server/OpenIddict.Sandbox.AspNetCore.Server.csproj +++ b/sandbox/OpenIddict.Sandbox.AspNetCore.Server/OpenIddict.Sandbox.AspNetCore.Server.csproj @@ -2,8 +2,6 @@ net48;net8.0 - false - false false disable diff --git a/sandbox/OpenIddict.Sandbox.AspNetCore.Server/Worker.cs b/sandbox/OpenIddict.Sandbox.AspNetCore.Server/Worker.cs index aaf8556c..07e73800 100644 --- a/sandbox/OpenIddict.Sandbox.AspNetCore.Server/Worker.cs +++ b/sandbox/OpenIddict.Sandbox.AspNetCore.Server/Worker.cs @@ -103,6 +103,47 @@ public class Worker : IHostedService }); } + if (await manager.FindByClientIdAsync("maui") is null) + { + await manager.CreateAsync(new OpenIddictApplicationDescriptor + { + ApplicationType = ApplicationTypes.Native, + ClientId = "maui", + ClientType = ClientTypes.Public, + ConsentType = ConsentTypes.Systematic, + DisplayName = "MAUI client application", + DisplayNames = + { + [CultureInfo.GetCultureInfo("fr-FR")] = "Application cliente MAUI" + }, + PostLogoutRedirectUris = + { + new Uri("com.openiddict.sandbox.maui.client:/callback/logout/local") + }, + RedirectUris = + { + new Uri("com.openiddict.sandbox.maui.client:/callback/login/local") + }, + Permissions = + { + Permissions.Endpoints.Authorization, + Permissions.Endpoints.Logout, + Permissions.Endpoints.Token, + Permissions.GrantTypes.AuthorizationCode, + Permissions.GrantTypes.RefreshToken, + Permissions.ResponseTypes.Code, + Permissions.Scopes.Email, + Permissions.Scopes.Profile, + Permissions.Scopes.Roles, + Permissions.Prefixes.Scope + "demo_api" + }, + Requirements = + { + Requirements.Features.ProofKeyForCodeExchange + } + }); + } + if (await manager.FindByClientIdAsync("mvc") is null) { await manager.CreateAsync(new OpenIddictApplicationDescriptor diff --git a/sandbox/OpenIddict.Sandbox.Console.Client/OpenIddict.Sandbox.Console.Client.csproj b/sandbox/OpenIddict.Sandbox.Console.Client/OpenIddict.Sandbox.Console.Client.csproj index b6c184db..738601fe 100644 --- a/sandbox/OpenIddict.Sandbox.Console.Client/OpenIddict.Sandbox.Console.Client.csproj +++ b/sandbox/OpenIddict.Sandbox.Console.Client/OpenIddict.Sandbox.Console.Client.csproj @@ -3,8 +3,6 @@ Exe net48;net8.0 - false - false diff --git a/sandbox/OpenIddict.Sandbox.Maui.Client/App.xaml b/sandbox/OpenIddict.Sandbox.Maui.Client/App.xaml new file mode 100644 index 00000000..7a653d33 --- /dev/null +++ b/sandbox/OpenIddict.Sandbox.Maui.Client/App.xaml @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/sandbox/OpenIddict.Sandbox.Maui.Client/App.xaml.cs b/sandbox/OpenIddict.Sandbox.Maui.Client/App.xaml.cs new file mode 100644 index 00000000..42de8c84 --- /dev/null +++ b/sandbox/OpenIddict.Sandbox.Maui.Client/App.xaml.cs @@ -0,0 +1,13 @@ +#if IOS || WINDOWS +namespace OpenIddict.Sandbox.Maui.Client; + +public partial class App : Application +{ + public App() + { + InitializeComponent(); + + MainPage = new AppShell(); + } +} +#endif diff --git a/sandbox/OpenIddict.Sandbox.Maui.Client/AppShell.xaml b/sandbox/OpenIddict.Sandbox.Maui.Client/AppShell.xaml new file mode 100644 index 00000000..aac5eadd --- /dev/null +++ b/sandbox/OpenIddict.Sandbox.Maui.Client/AppShell.xaml @@ -0,0 +1,14 @@ + + + + + + diff --git a/sandbox/OpenIddict.Sandbox.Maui.Client/AppShell.xaml.cs b/sandbox/OpenIddict.Sandbox.Maui.Client/AppShell.xaml.cs new file mode 100644 index 00000000..b3c46f73 --- /dev/null +++ b/sandbox/OpenIddict.Sandbox.Maui.Client/AppShell.xaml.cs @@ -0,0 +1,8 @@ +#if IOS || WINDOWS +namespace OpenIddict.Sandbox.Maui.Client; + +public partial class AppShell : Shell +{ + public AppShell() => InitializeComponent(); +} +#endif diff --git a/sandbox/OpenIddict.Sandbox.Maui.Client/MainPage.xaml b/sandbox/OpenIddict.Sandbox.Maui.Client/MainPage.xaml new file mode 100644 index 00000000..3db3b890 --- /dev/null +++ b/sandbox/OpenIddict.Sandbox.Maui.Client/MainPage.xaml @@ -0,0 +1,62 @@ + + + + + + + + +