feat: reuse authentication for all HTTP integrations
This commit is contained in:
1 parent
879a4ae23c
commit
901fd3d940
36 files changed
+830
-295
No files matched your search
@@ -9,7 +9,7 @@ request to a different origin.
|
||||
|
||||
## Existing integrations
|
||||
|
||||
Sources can reuse configured Sonarr, Radarr, Lidarr, Readarr, Prowlarr, Overseerr, Jellyseerr, Seerr, Immich, slskd, Home Assistant, Coolify, Audiobookshelf, Speedtest Tracker, AdGuard Home, and Nextcloud integrations:
|
||||
Sources can reuse any configured HTTP integration, including its saved credentials and login session. WebSocket-only integrations and the internal mock integration are excluded:
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -23,7 +23,7 @@ paths append to the saved URL, including reverse-proxy subpaths. Changing the in
|
||||
Deleting it leaves the widget unconfigured until another instance is selected. The binding is shared by every placement
|
||||
of that widget definition. Exports and Workshop submissions retain the required type and omit the local integration ID.
|
||||
|
||||
Arbitrary integration requests require integration `full` access, including GET requests: service APIs can expose credentials or change state through reads. Board permissions still apply separately. Saved credentials are redacted from upstream responses. Non-GET integration requests must be actions. Requests and redirects stay within the configured URL path.
|
||||
Arbitrary integration requests require integration `full` access, including GET requests: service APIs can expose credentials or change state through reads. Board permissions still apply separately. Saved credentials are redacted from upstream responses. Non-GET integration requests must be actions. Requests and redirects stay within the configured URL path. Expired sessions are refreshed; queries can retry once, while actions require another explicit invocation.
|
||||
|
||||
## Named requests
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ import type { WorkshopSubmission, WorkshopVote } from "@site/src/lib/pocketbase"
|
||||
import { getWorkshopBackend } from "@site/src/lib/pocketbase";
|
||||
import { getRuntimeWorkshopApiUrl } from "@site/src/lib/runtime-config";
|
||||
import type { SubmissionType } from "@site/src/lib/workshop-schema";
|
||||
import { integrationDefs } from "@homarr/definitions";
|
||||
import { integrationDefs, isHttpIntegrationKind } from "@homarr/definitions";
|
||||
import type { HomarrCustomWidgetV2 } from "@homarr/custom-widgets/core";
|
||||
import {
|
||||
githubAvatarUrl,
|
||||
@@ -100,7 +100,11 @@ const avatarFallback = (name: string) => name.trim().slice(0, 1).toUpperCase() |
|
||||
type WidgetSource = HomarrCustomWidgetV2["sources"][string];
|
||||
|
||||
const sourceHost = (source: WidgetSource) => {
|
||||
if (source.type === "integration") return `${integrationDefs[source.integrationKind].name} integration`;
|
||||
if (source.type === "integration") {
|
||||
if (isHttpIntegrationKind(source.integrationKind))
|
||||
return `${integrationDefs[source.integrationKind].name} integration`;
|
||||
return `${source.integrationKind} integration`;
|
||||
}
|
||||
const { baseUrl } = source;
|
||||
try {
|
||||
return new URL(baseUrl).host;
|
||||
|
||||
Reference in new issue
Block a user