-
Notifications
You must be signed in to change notification settings - Fork 224
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
Support for Cesium ion servers running in single-user authentication mode. #841
Conversation
* | ||
* @return A future that resolves to the application information. | ||
*/ | ||
static CesiumAsync::Future<Response<ApplicationData>> appData( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kinda think the verb form "getAppData" would be more descriptive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would make sense, but I wanted to keep the naming consistent with the rest of the methods. In this class, all the get* methods return private members of the class, whereas all the methods calling endpoints are named with that endpoint name (me
, assets
, defaults
, etc).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me @azrogers! Not super familiar with the ion code myself, but with respect to everything else in there, it makes sense to me 😄
Just a few nitpick comments. Could you also merge with main and update CHANGES.md for this PR?
Thanks @azrogers ! |
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.