CesiumGS / cesium-native

Apache License 2.0
402 stars 205 forks source link

Support for Cesium ion servers running in single-user authentication mode. #841

Closed azrogers closed 3 months ago

azrogers commented 4 months ago

Out of the box, Cesium ion Self-Hosted is set-up in the single-user authentication mode, which means that it has no accounts or tokens - any request that can reach the server is considered valid. This is a problem for cesium-native and its integrations, which expect Cesium ion to always require a token.

This change is a necessary part of adding this support. It changes cesium-native to allow requesting the active authentication mode from the /appData endpoint, and allows Unity and Unreal integrations to access the current authentication mode. It also provides dummy responses for the /me and /tokens endpoints when running in single-user mode, as these endpoints don't exist in the single-user configuration.

j9liu commented 3 months ago

Thanks @azrogers !