[PR #602] [CLOSED] Draft: user-header authentication #1345

Closed
opened 2026-05-07 01:01:41 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/binwiederhier/ntfy/pull/602
Author: @ngerstle
Created: 2/4/2023
Status: Closed

Base: mainHead: ng/user-header


📝 Commits (3)

  • a69f9c5 add user-header config value
  • 524f9c3 add skeleton code to server.go
  • 795a8e0 add prevalidateduser call to auth module- should be refactored

📊 Changes

4 files changed (+25 additions, -4 deletions)

View changed files

📝 auth/auth.go (+3 -0)
📝 auth/auth_sqlite.go (+6 -0)
📝 server/config.go (+2 -0)
📝 server/server.go (+14 -4)

📄 Description

This begins to sketch out a hacky way to implement https://github.com/binwiederhier/ntfy/issues/601.
Not being particularly familiar with go, or the ntfy code base, I haven't tried to compile or run this code.

I'm not particulary comfortable with the interface between auth and server- unless basic auth support is removed from auth, I'd suggest moving code for credential extraction from the request to the auther, whether that's using basic auth or a configured header, and select which auther to use during server setup.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/binwiederhier/ntfy/pull/602 **Author:** [@ngerstle](https://github.com/ngerstle) **Created:** 2/4/2023 **Status:** ❌ Closed **Base:** `main` ← **Head:** `ng/user-header` --- ### 📝 Commits (3) - [`a69f9c5`](https://github.com/binwiederhier/ntfy/commit/a69f9c5bf254d3a68a7e8acaf50c2d92872e474e) add user-header config value - [`524f9c3`](https://github.com/binwiederhier/ntfy/commit/524f9c3082cf2e568ac251f04633e290b171013b) add skeleton code to server.go - [`795a8e0`](https://github.com/binwiederhier/ntfy/commit/795a8e0399cdcce71c39ca1f2de6ac0e92b688d5) add prevalidateduser call to auth module- should be refactored ### 📊 Changes **4 files changed** (+25 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `auth/auth.go` (+3 -0) 📝 `auth/auth_sqlite.go` (+6 -0) 📝 `server/config.go` (+2 -0) 📝 `server/server.go` (+14 -4) </details> ### 📄 Description This begins to sketch out a hacky way to implement https://github.com/binwiederhier/ntfy/issues/601. Not being particularly familiar with go, or the ntfy code base, I haven't tried to compile or run this code. I'm not particulary comfortable with the interface between `auth` and `server`- unless basic auth support is removed from `auth`, I'd suggest moving code for credential extraction from the request to the `auther`, whether that's using basic auth or a configured header, and select which auther to use during server setup. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-07 01:01:41 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ntfy#1345
No description provided.