feat(app-connections/azure-client-secrets): certificate auth

This commit is contained in:
Daniel Hougaard
2025-11-06 05:59:57 +04:00
parent dab4c35ec9
commit 32587a3c99
9 changed files with 369 additions and 15 deletions

View File

@@ -12,12 +12,14 @@ const syntaxHighlight = (
isVisible?: boolean,
isImport?: boolean,
isLoadingValue?: boolean,
isErrorLoadingValue?: boolean
isErrorLoadingValue?: boolean,
placeholder?: string
) => {
if (isLoadingValue) return HIDDEN_SECRET_VALUE;
if (isErrorLoadingValue)
return <span className="ph-no-capture text-red/75">Error loading secret value.</span>;
if (isImport && !content) return "IMPORTED";
if (placeholder && (content === "" || !content)) return placeholder;
if (content === "") return "EMPTY";
if (!content) return "EMPTY";
if (!isVisible) return HIDDEN_SECRET_VALUE;
@@ -79,6 +81,7 @@ export const SecretInput = forwardRef<HTMLTextAreaElement, Props>(
canEditButNotView,
isLoadingValue,
isErrorLoadingValue,
placeholder,
...props
},
ref
@@ -93,18 +96,25 @@ export const SecretInput = forwardRef<HTMLTextAreaElement, Props>(
<div className="relative overflow-hidden">
<pre aria-hidden className="m-0">
<code className={`inline-block w-full ${commonClassName}`}>
<span style={{ whiteSpace: "break-spaces" }}>
<span
className={twMerge(
"whitespace-break-spaces",
placeholder && !value && "text-gray-500/50"
)}
>
{syntaxHighlight(
value,
isVisible || (isSecretFocused && !valueAlwaysHidden),
isImport,
isLoadingValue,
isErrorLoadingValue
isErrorLoadingValue,
placeholder
)}
</span>
</code>
</pre>
<textarea
placeholder={placeholder}
style={{ whiteSpace: "break-spaces" }}
aria-label="secret value"
ref={ref}