Fetches temporary AWS credentials from POST /v1/user/credentials.
Shared by ESPRMNeoUser.getTemporaryAWSCredentials and callers that
need identity-pool credentials (e.g. AssumeRole / MQTT setup) without
depending on prototype attachment order.
Flow:
Ensure a non-expired Cognito ID token (refresh session if needed).
POST credentials with Bearer ID token.
On 401 expired-token, refresh the session and retry (up to
MAX_CREDENTIAL_RETRIES times).
Fetches temporary AWS credentials from
POST /v1/user/credentials.Shared by ESPRMNeoUser.getTemporaryAWSCredentials and callers that need identity-pool credentials (e.g. AssumeRole / MQTT setup) without depending on prototype attachment order.
Flow:
MAX_CREDENTIAL_RETRIEStimes).