isConfigured method

bool isConfigured()

Is this service configured and authenticated to CARP?

Implementation

bool isConfigured() {
  if (!CarpService().isConfigured)
    throw CarpBackendException(
        "CARP Service has not been configured - call 'CarpService().configure()' first.");
  if (!CarpService().authenticated)
    throw CarpBackendException(
        "No user is authenticated - call 'CarpService().authenticate()' first.");

  if (!CarpDeploymentService().isConfigured) {
    CarpDeploymentService().configureFrom(CarpService());
    _eventController.add(CarpBackendEvents.Initialized);
  }
  return CarpDeploymentService().isConfigured;
}