mirror of
https://github.com/gethomepage/homepage.git
synced 2025-12-07 09:35:54 -08:00
Enhancement: support photoprism app passwords (#4028)
Some checks are pending
Docker / Linting Checks (push) Waiting to run
Docker / Docker Build & Push (push) Blocked by required conditions
Docs / Linting Checks (push) Waiting to run
Docs / Test Build (push) Blocked by required conditions
Docs / Build & Deploy (push) Blocked by required conditions
Some checks are pending
Docker / Linting Checks (push) Waiting to run
Docker / Docker Build & Push (push) Blocked by required conditions
Docs / Linting Checks (push) Waiting to run
Docs / Test Build (push) Blocked by required conditions
Docs / Build & Deploy (push) Blocked by required conditions
This commit is contained in:
@@ -3,7 +3,9 @@ title: PhotoPrism
|
|||||||
description: PhotoPrism Widget Configuration
|
description: PhotoPrism Widget Configuration
|
||||||
---
|
---
|
||||||
|
|
||||||
Learn more about [PhotoPrism](https://github.com/photoprism/photoprism)..
|
Learn more about [PhotoPrism](https://github.com/photoprism/photoprism).
|
||||||
|
|
||||||
|
Authentication is possible via [app passwords](https://docs.photoprism.app/user-guide/settings/account/#apps-and-devices) or username/password.
|
||||||
|
|
||||||
Allowed fields: `["albums", "photos", "videos", "people"]`.
|
Allowed fields: `["albums", "photos", "videos", "people"]`.
|
||||||
|
|
||||||
@@ -11,6 +13,7 @@ Allowed fields: `["albums", "photos", "videos", "people"]`.
|
|||||||
widget:
|
widget:
|
||||||
type: photoprism
|
type: photoprism
|
||||||
url: http://photoprism.host.or.ip:port
|
url: http://photoprism.host.or.ip:port
|
||||||
username: admin
|
username: admin # required only if using username/password
|
||||||
password: password
|
password: password # required only if using username/password
|
||||||
|
key: # required only if using app passwords
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -32,6 +32,11 @@ export default async function photoprismProxyHandler(req, res) {
|
|||||||
username: widget.username,
|
username: widget.username,
|
||||||
password: widget.password,
|
password: widget.password,
|
||||||
});
|
});
|
||||||
|
} else if (widget.key) {
|
||||||
|
params.headers.Authorization = `Bearer ${widget.key}`;
|
||||||
|
params.body = JSON.stringify({
|
||||||
|
authToken: widget.key,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const [status, contentType, data] = await httpProxy(url, params);
|
const [status, contentType, data] = await httpProxy(url, params);
|
||||||
|
|||||||
Reference in New Issue
Block a user