Repository navigation
feat(network): send a HAAC user agent and test the token refresh - #159
Merged
Merged
Conversation
HA's log showed /auth/token failures as okhttp/5.5.0. Requests now carry HAAC/<version> (Android <sdk>), so HAAC can be told apart from other apps. Tests: fixed client_id on refresh, no request after a revoked token, one refresh for parallel access token calls. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GJNKFeeESsuXpfVuyktb3h
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GJNKFeeESsuXpfVuyktb3h
The online Claude Doc no longer exists. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GJNKFeeESsuXpfVuyktb3h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Anton · project thread
Hintergrund
Im HA-Log tauchten
/auth/token-Fehler mitokhttp/5.5.0auf. Die Code-Prüfung ergab:client_idist konstant, der Refresh läuft unter einem Mutex, ein abgelehntes Refresh-Token wird gelöscht und danach nicht mehr gesendet. HAAC ruft/api/confignie auf und bündelt OkHttp 5.5.1. HAAC ist als Absender daher unwahrscheinlich.Änderungen
UserAgentInterceptor:User-Agent: HAAC/<Version> (Android <SDK>)für alle Requests (REST und WebSocket).client_id; nachinvalid_grantkeine weitere Anfrage; paralleleaccessToken()-Aufrufe lösen nur einen Refresh aus; User-Agent beim Refresh.docs/code-index.mdaktualisiert (mit dem Offline-Port des Generators;codeIndexCheckist grün).docs/concept.md5.1: neuer Punkt „User agent“.CLAUDE.mdunddocs/development.md:docs/concept.mdist die einzige Version des Konzepts, das Claude Doc existiert nicht mehr.Nicht enthalten
Der OAuth-Fehlercode (
invalid_grant/invalid_request) wird nicht in die Fehlerdetails übernommen. Dafür fehlt ein passendes Feld inHaacException,bridgeCodewäre falsch beschriftet.Noch zu tun nach dem Merge
docs/concept.mdin einem eigenen PR nachstacknoise/haac-bridgekopieren.🤖 Generated with Claude Code
https://claude.ai/code/session_01GJNKFeeESsuXpfVuyktb3h