All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.camunda.common.auth.DefaultNoopAuthentication Maven / Gradle / Ivy

There is a newer version: 8.5.10
Show newest version
package io.camunda.common.auth;

import io.camunda.common.exception.SdkException;
import java.lang.invoke.MethodHandles;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Default implementation for Authentication Typically you will replace this by a proper
 * authentication by setting the right properties
 */
public class DefaultNoopAuthentication implements Authentication {

  private static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());

  private final String errorMessage =
      "Unable to determine authentication. Please check your configuration";

  public DefaultNoopAuthentication() {
    LOG.error(errorMessage);
  }

  @Override
  public void resetToken(Product product) {
    throw new SdkException(errorMessage);
  }

  @Override
  public Map getTokenHeader(Product product) {
    throw new UnsupportedOperationException("Unable to determine authentication");
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy