congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Authentication.configure
Code IndexAdd Tabnine to your IDE (free)

How to use
configure
method
in
org.apache.pulsar.client.api.Authentication

Best Java code snippets using org.apache.pulsar.client.api.Authentication.configure (Showing top 4 results out of 315)

origin: apache/pulsar

  /**
   * Create an instance of the Authentication-Plugin
   *
   * @param authPluginClassName
   *            name of the Authentication-Plugin you want to use
   * @param authParams
   *            map which represents parameters for the Authentication-Plugin
   * @return instance of the Authentication-Plugin
   * @throws UnsupportedAuthenticationException
   */
  @SuppressWarnings("deprecation")
  public static final Authentication create(String authPluginClassName, Map<String, String> authParams)
      throws UnsupportedAuthenticationException {
    try {
      if (isNotBlank(authPluginClassName)) {
        Class<?> authClass = Class.forName(authPluginClassName);
        Authentication auth = (Authentication) authClass.newInstance();
        auth.configure(authParams);
        return auth;
      } else {
        return new AuthenticationDisabled();
      }
    } catch (Throwable t) {
      throw new UnsupportedAuthenticationException(t);
    }
  }
}
origin: apache/pulsar

} else {
  auth.configure(configureFromPulsar1AuthParamString(authParamsString));
origin: org.apache.pulsar/pulsar-client-original

  /**
   * Create an instance of the Authentication-Plugin
   *
   * @param authPluginClassName name of the Authentication-Plugin you want to use
   * @param authParams          map which represents parameters for the Authentication-Plugin
   * @return instance of the Authentication-Plugin
   * @throws UnsupportedAuthenticationException
   */
  @SuppressWarnings("deprecation")
  public static final Authentication create(String authPluginClassName, Map<String, String> authParams)
      throws UnsupportedAuthenticationException {
    try {
      if (isNotBlank(authPluginClassName)) {
        Class<?> authClass = Class.forName(authPluginClassName);
        Authentication auth = (Authentication) authClass.newInstance();
        auth.configure(authParams);
        return auth;
      } else {
        return new AuthenticationDisabled();
      }
    } catch (Throwable t) {
      throw new UnsupportedAuthenticationException(t);
    }
  }
}
origin: org.apache.pulsar/pulsar-client-original

/**
 * Create an instance of the Authentication-Plugin
 *
 * @param authPluginClassName name of the Authentication-Plugin you want to use
 * @param authParamsString    string which represents parameters for the Authentication-Plugin, e.g., "key1:val1,key2:val2"
 * @return instance of the Authentication-Plugin
 * @throws UnsupportedAuthenticationException
 */
@SuppressWarnings("deprecation")
public static final Authentication create(String authPluginClassName, String authParamsString)
    throws UnsupportedAuthenticationException {
  try {
    if (isNotBlank(authPluginClassName)) {
      Class<?> authClass = Class.forName(authPluginClassName);
      Authentication auth = (Authentication) authClass.newInstance();
      if (auth instanceof EncodedAuthenticationParameterSupport) {
        // Parse parameters on plugin side.
        ((EncodedAuthenticationParameterSupport) auth).configure(authParamsString);
      } else {
        // Parse parameters by default parse logic.
        auth.configure(AuthenticationUtil.configureFromPulsar1AuthParamString(authParamsString));
      }
      return auth;
    } else {
      return new AuthenticationDisabled();
    }
  } catch (Throwable t) {
    throw new UnsupportedAuthenticationException(t);
  }
}
org.apache.pulsar.client.apiAuthenticationconfigure

Javadoc

Configure the authentication plugins with the supplied parameters

Popular methods of Authentication

  • getAuthData
  • start
    Initialize the authentication provider
  • close
  • getAuthMethodName

Popular in Java

  • Making http post requests using okhttp
  • setRequestProperty (URLConnection)
  • addToBackStack (FragmentTransaction)
  • notifyDataSetChanged (ArrayAdapter)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Collectors (java.util.stream)
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now