-
Notifications
You must be signed in to change notification settings - Fork 319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removing the accessToken from MapboxHistoryReader
constructor
#4662
Comments
MapboxHistoryReader
MapboxHistoryReader
MapboxHistoryReader
constructor
To answer some questions "Why is the access token needed for the set route event?"In order to create a "Why isn't the access token already inside the history set route events?"More explanation here mapbox/mapbox-java#1267. We are not serializing access tokens to avoid unintentional leaks. |
Thanks for starting the discussion 👍 From the listed options I prefer There's also another alternative:
and remove the token from the The status quo of having a token in What do you think @mapbox/navigation-android? |
Thanks and yeah I agree here. Ran with it over here #4667. As for the other alternative of removing the That approach would also revert the |
That's right. Let me run with a prototype in |
The integration test verify_history_files_are_recorded_and_readable verifies the
MapboxHistoryRecorder
works for recording a history file and then theMapboxHistoryReader
can read that recording.We introduced the access token to ensure the new code contracts are satisfied #4652. But now we are passing an accessToken that can be useless when you are not using the HistoryEventSetRoute
Approaches
String?
. This will force the developer to useDirectionsRoute.toJson(event.directionsRoute, accessToken)
when they use theMapboxHistoryReader
HistoryEventSetRoute
is ignored.MapboxHistoryReader
to have an editableMapper
+Builder
member. And then update theMapboxHistoryMapper
to have a builder, similar to ReplayHistoryMapper. TheSetRouteHistoryMapper
will have the required accessToken.MapboxHistoryReader
from aMapboxNavigation
extension. For example,mapboxNavigation.historyRecorder
andmapboxNavigation.historyReader
.The text was updated successfully, but these errors were encountered: