# CesiumIonAuthPlugin

class in `3d-tiles-renderer/core/plugins`

```js
import { CesiumIonAuthPlugin } from '3d-tiles-renderer/core/plugins';
```

Plugin for authenticating requests to Cesium Ion. Handles token refresh, asset endpoint
resolution, and attribution collection. Automatically registers a GoogleCloudAuthPlugin
when the resolved asset is an external Google photorealistic tileset.

## Constructor

```js
new CesiumIonAuthPlugin( options: Object )
```

- `options`, `Object`
  - `apiToken`, `string`
  - `assetId`, `number | null`, optional, default `null`
  - `autoRefreshToken`, `boolean`, optional, default `false`
  - `useRecommendedSettings`, `boolean`, optional, default `true`
  - `assetTypeHandler`, `AssetTypeHandlerCallback`, optional

## Properties

### .assetId: number | null

The Cesium Ion asset ID to load, or null if using an explicit root URL.

### .autoRefreshToken: boolean

Whether to automatically refresh the token on 4xx errors.

### .useRecommendedSettings: boolean

Whether to apply recommended renderer settings for Cesium Ion assets.

### .assetTypeHandler: AssetTypeHandlerCallback

Callback invoked when the resolved Cesium Ion asset type is not `3DTILES`.

### .tiles: Object | null

The TilesRenderer instance this plugin is registered with.
