diff --git a/js/apps/admin-ui/src/clients/credentials/Credentials.tsx b/js/apps/admin-ui/src/clients/credentials/Credentials.tsx
index 34f5b8c9cb..895f132727 100644
--- a/js/apps/admin-ui/src/clients/credentials/Credentials.tsx
+++ b/js/apps/admin-ui/src/clients/credentials/Credentials.tsx
@@ -67,6 +67,10 @@ export const Credentials = ({ client, save, refresh }: CredentialsProps) => {
const [accessToken, setAccessToken] = useState("");
const [open, isOpen] = useState(false);
+ const selectedProvider = providers.find(
+ (provider) => provider.id === clientAuthenticatorType,
+ );
+
useFetch(
() =>
Promise.all([
@@ -200,17 +204,17 @@ export const Credentials = ({ client, save, refresh }: CredentialsProps) => {
- {(clientAuthenticatorType === "client-secret" ||
- clientAuthenticatorType === "client-secret-jwt") && }
- {(clientAuthenticatorType === "client-secret" ||
- clientAuthenticatorType === "client-secret-jwt") && (
-
-
-
+ {selectedProvider?.supportsSecret && (
+ <>
+
+
+
+
+ >
)}
diff --git a/js/libs/keycloak-admin-client/src/defs/authenticatorConfigRepresentation.ts b/js/libs/keycloak-admin-client/src/defs/authenticatorConfigRepresentation.ts
index 00830a86a4..a46ca76246 100644
--- a/js/libs/keycloak-admin-client/src/defs/authenticatorConfigRepresentation.ts
+++ b/js/libs/keycloak-admin-client/src/defs/authenticatorConfigRepresentation.ts
@@ -13,4 +13,5 @@ export interface AuthenticationProviderRepresentation {
id?: string;
displayName?: string;
description?: string;
+ supportsSecret?: boolean;
}
diff --git a/services/src/main/java/org/keycloak/services/resources/admin/AuthenticationManagementResource.java b/services/src/main/java/org/keycloak/services/resources/admin/AuthenticationManagementResource.java
index 4fadf64571..5438a01845 100755
--- a/services/src/main/java/org/keycloak/services/resources/admin/AuthenticationManagementResource.java
+++ b/services/src/main/java/org/keycloak/services/resources/admin/AuthenticationManagementResource.java
@@ -158,17 +158,27 @@ public class AuthenticationManagementResource {
@Operation( summary = "Get client authenticator providers Returns a stream of client authenticator providers.")
public Stream