class SplitIoClient::Engine::AuthApiClient

def process_success(response, start)

def process_success(response, start)
  @config.logger.debug("Success connection to: #{@config.auth_service_url}") if @config.debug_enabled
  record_telemetry(start)
  body_json = JSON.parse(response.body, symbolize_names: true)
  push_enabled = body_json[:pushEnabled]
  token = body_json[:token]
  if push_enabled
    decoded_token = decode_token(token)
    channels = channels(decoded_token)
    exp = expiration(decoded_token)
    @telemetry_runtime_producer.record_token_refreshes
  end
  { push_enabled: push_enabled, token: token, channels: channels, exp: exp, retry: true }
end