Ogc3dAuthCredentials

Round-trip serialization for TilesetAuthProvider credentials so a 3D-Tiles cache can carry enough info to be reopened from ContentManager.findEntry(...) without the caller having to supply credentials separately.

Stored in earth.worldwind.layer.cache.WebServiceInfo.metadata as a small JSON envelope paired with the provider class name in earth.worldwind.layer.cache.WebServiceInfo.layerName. Same local-storage tradeoff as keeping the credentials in any other on-device DB (Room / SharedPreferences / Keychain).

Functions

Link copied to clipboard
fun decode(discriminator: String?, metadata: String?): TilesetAuthProvider

Reconstruct a provider from its class-name discriminator + metadata JSON. Returns NoAuthProvider when the discriminator is unknown / metadata is missing / decode fails — never throws. Callers wanting to fail loudly should null-check upstream.

Link copied to clipboard

Encode the provider's secret(s) to a JSON string, or null when there's nothing to store (NoAuthProvider, CompositeAuthProvider).