diff --git a/src/BlazorApp/Aguacongas.TheIdServer.BlazorApp.Pages.Client/Client.razor b/src/BlazorApp/Aguacongas.TheIdServer.BlazorApp.Pages.Client/Client.razor index 06e0e5812..f25d3928e 100644 --- a/src/BlazorApp/Aguacongas.TheIdServer.BlazorApp.Pages.Client/Client.razor +++ b/src/BlazorApp/Aguacongas.TheIdServer.BlazorApp.Pages.Client/Client.razor @@ -219,16 +219,19 @@ else { } -
-
-
-
@Localizer["External provider restrictions"]
+ @if (!Model.IsClientCredentialOnly()) + { +
+
+
+
@Localizer["External provider restrictions"]
+
+
+
+
-
- -
-
+ }
diff --git a/src/BlazorApp/Aguacongas.TheIdServer.BlazorApp.Pages.Client/Components/ClientTokens.razor b/src/BlazorApp/Aguacongas.TheIdServer.BlazorApp.Pages.Client/Components/ClientTokens.razor index 90534688c..852099610 100644 --- a/src/BlazorApp/Aguacongas.TheIdServer.BlazorApp.Pages.Client/Components/ClientTokens.razor +++ b/src/BlazorApp/Aguacongas.TheIdServer.BlazorApp.Pages.Client/Components/ClientTokens.razor @@ -70,28 +70,25 @@ }
- @if (_showAllOptions || Model.HasUser()) - { -
- -
- -
- -
+
+ +
+ +
+
-
- -
- -
+
+
+ +
+
- } +
@if (_showAllOptions || Model.CanUseRefreshToken()) {
diff --git a/src/BlazorApp/Aguacongas.TheIdServer.BlazorApp.Pages.Client/Extensions/ClientExtensions.cs b/src/BlazorApp/Aguacongas.TheIdServer.BlazorApp.Pages.Client/Extensions/ClientExtensions.cs index 424922778..e23497af3 100644 --- a/src/BlazorApp/Aguacongas.TheIdServer.BlazorApp.Pages.Client/Extensions/ClientExtensions.cs +++ b/src/BlazorApp/Aguacongas.TheIdServer.BlazorApp.Pages.Client/Extensions/ClientExtensions.cs @@ -7,6 +7,11 @@ namespace Aguacongas.TheIdServer.BlazorApp.Pages.Client.Extentions { public static class ClientExtensions { + public static bool IsClientCredentialOnly(this IdentityServer.Store.Entity.Client client) + { + return client.AllowedGrantTypes.All(g => g.GrantType == "client_credentials"); + } + public static bool IsWebClient(this IdentityServer.Store.Entity.Client client) { return client.ProtocolType == "wsfed" ||