Skip to content

feat: add remaining Authentication API endpoints - #133

Merged
mikemadeja merged 4 commits into
developfrom
feature/auth
Oct 1, 2026
Merged

mikemadeja merged 4 commits into
developfrom
feature/auth

Conversation

@mikemadeja

@mikemadeja mikemadeja commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Add Get-PiHoleAuthStatus (GET /auth) and Get-PiHoleAuthTotp (GET /auth/totp), rounding out the Authentication API area with its two simple status-check endpoints
  • Get-PiHoleAuthStatus's -Password is optional, unlike every other function in the module: its real value is checking whether a Pi-hole requires a login at all for the calling client, which only works when called with no credentials. Passing -Password instead checks the status of a real login
  • (New-PiHoleAppPassword / GET /auth/app was dropped from this PR - niche credential-management feature, not worth carrying alongside these two simple status checks)

Test plan

  • Integration tests pass against a live server (10/10, including the 3 pre-existing Authentication tests)
  • Confirmed Get-PiHoleAuthStatus without -Password correctly surfaces a 401 on this test server (which requires login for API clients)
  • PSScriptAnalyzer clean on the new files
  • Non-integration unit suite passes
  • README.md / docs/EXAMPLES.md regenerated

🤖 Generated with Claude Code

mikemadeja and others added 4 commits September 30, 2026 19:44
Adds Get-PiHoleAuthStatus (GET /auth), Get-PiHoleAuthTotp
(GET /auth/totp), and New-PiHoleAppPassword (GET /auth/app),
completing the Authentication API area.

Get-PiHoleAuthStatus's -Password is optional, unlike every other
function in the module: its real value is checking whether a Pi-hole
requires a login at all for the calling client, which only works when
called without credentials. Passing -Password instead checks the
status of a real login.

New-PiHoleAppPassword only generates a candidate password/hash pair -
confirmed via testing that it has no effect, including no session
invalidation, until the returned hash is explicitly applied via
config, despite the API's own description text suggesting otherwise.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Picks up DHCP's examples alongside the Authentication ones added on
this branch, and refreshes stale stats/history output with fresh
captured data.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Not important enough to carry alongside the other Authentication
endpoints - app passwords are a niche credential-management feature,
unlike Get-PiHoleAuthStatus/Get-PiHoleAuthTotp which are simple status
checks. Get-PiHoleAuthStatus and Get-PiHoleAuthTotp remain.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@mikemadeja
mikemadeja merged commit 7344c5b into develop Oct 1, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant