I'm trying to migrate from 3.x to 4.x and I have a FeatureLayer that requires an auth token. I used to just pass it in the query string like "https://blahblah/MapServer/5?token=abc123" but in 4.x it seems to want the token to be passed in the HTTP header.
The documentation doesn't seem to cover this scenario. The docs simply tell me what header to pass, but since all the HTTP requests are handled by the SDK, I don't know how to configure those requests to have the header. I've tried using the IdentityManager's registerToken() call, and I don't get any errors but it doesn't use the token, either.