Repository navigation
fix: send the app token on every request - #23
Merged
Merged
Conversation
The app token was only sent with the install report. The other SDKs send it as a header on every request, so link lookups are limited to the app's own workspace and an event can name it. Self-hosted Core doesn't use it.
Merged
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.
The app token was only sent with the install report. The other LinkForty SDKs send it as an
X-LinkForty-App-Tokenheader on every request. A server that uses it can then limit link lookups to the app's own workspace, and identify the app on events.Change
NetworkManageradds the header whenappTokenis set and not empty. Without a token, nothing changes. Self-hosted Core doesn't use it.Behavior note
An app that sets a token will now get link lookups limited to its own workspace on servers that support it, as on the other SDKs.
Testing
New tests cover the header with a token, with none, and with an empty one.
flutter test(177 tests) andflutter analyzepass.