Authentication helper for Cesium Ion. Fetches and caches a bearer token from the Cesium Ion endpoint and injects it into outgoing requests. Supports optional automatic token refresh on 4xx responses.
Properties
apiToken: string
The Cesium Ion access token.
autoRefreshToken: boolean
Whether to automatically refresh the token on 4xx errors.
authURL: string | null
The endpoint URL used to fetch the bearer token.
Methods
new CesiumIonAuth(
options: {
apiToken: string,
autoRefreshToken: boolean = false
}
)