feat(server): add revealHttpAuthLiterals API and enhance web interface for credential management

- Implemented revealHttpAuthLiterals function to return plaintext credential fields from HTTP auth configurations.
- Added a new endpoint in the HTTP auths API to reveal credentials securely.
- Updated the web interface to fetch and display plaintext literals, improving user experience for managing credentials.
- Enhanced CredentialFields component to support revealing and masking credential values dynamically.
This commit is contained in:
2026-08-15 06:43:16 +07:00
parent d666dc001d
commit 5bfbafeb91
4 changed files with 270 additions and 49 deletions
+5
View File
@@ -383,3 +383,8 @@ export function useDeleteHttpAuth() {
onSuccess: () => qc.invalidateQueries({ queryKey: ["http-auths"] }),
});
}
/** Fetch plaintext literals only (not encrypted secrets). */
export async function fetchHttpAuthLiterals(name) {
return (await api.get(`/http-auths/${encodeURIComponent(name)}/reveal`)).data;
}