pulsar-client-cpp
Loading...
Searching...
No Matches
Static Public Member Functions | Static Protected Member Functions | Static Protected Attributes | List of all members
pulsar::AuthFactory Class Reference

#include <Authentication.h>

Static Public Member Functions

static AuthenticationPtr Disabled ()
 
static AuthenticationPtr create (const std::string &pluginNameOrDynamicLibPath)
 
static AuthenticationPtr create (const std::string &pluginNameOrDynamicLibPath, const std::string &authParamsString)
 
static AuthenticationPtr create (const std::string &pluginNameOrDynamicLibPath, ParamMap &params)
 

Static Protected Member Functions

static void release_handles ()
 

Static Protected Attributes

static bool isShutdownHookRegistered_
 
static std::vector< void * > loadedLibrariesHandles_
 

Detailed Description

AuthFactory is used to create instances of Authentication class when configuring a Client instance. It loads the authentication from an external plugin.

To use authentication methods that are internally supported, you should use AuthTls::create("my-cert.pem", "my-private.key") or similar.

Member Function Documentation

◆ create() [1/3]

static AuthenticationPtr pulsar::AuthFactory::create ( const std::string &  pluginNameOrDynamicLibPath)
static

Create an AuthenticationPtr with an empty ParamMap

See also
create(const std::string&, const ParamMap&)

◆ create() [2/3]

static AuthenticationPtr pulsar::AuthFactory::create ( const std::string &  pluginNameOrDynamicLibPath,
const std::string &  authParamsString 
)
static

Create an AuthenticationPtr with a ParamMap that is converted from authParamsString

See also
Authentication::parseDefaultFormatAuthParams
create(const std::string&, const ParamMap&)

◆ create() [3/3]

static AuthenticationPtr pulsar::AuthFactory::create ( const std::string &  pluginNameOrDynamicLibPath,
ParamMap &  params 
)
static

Create an AuthenticationPtr

When the first parameter represents the plugin name, the type of authentication can be one of the following:

  • AuthTls (if the plugin name is “tls”)
  • AuthToken (if the plugin name is “token” or “org.apache.pulsar.client.impl.auth.AuthenticationToken”)
  • AuthAthenz (if the plugin name is “athenz” or “org.apache.pulsar.client.impl.auth.AuthenticationAthenz”)
  • AuthOauth2 (if the plugin name is “oauth2token” or “org.apache.pulsar.client.impl.auth.oauth2.AuthenticationOAuth2”)
Parameters
pluginNameOrDynamicLibPaththe plugin name or the path or a dynamic library that contains the implementation of Authentication
paramsthe ParamMap that is passed to Authentication::create method

The documentation for this class was generated from the following file: