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

#include <Authentication.h>

Inheritance diagram for pulsar::AuthBasic:
pulsar::Authentication

Public Member Functions

 AuthBasic (AuthenticationDataPtr &)
 
const std::string getAuthMethodName () const override
 
Result getAuthData (AuthenticationDataPtr &authDataBasic) override
 
virtual const std::string getAuthMethodName () const =0
 
virtual Result getAuthData (AuthenticationDataPtr &authDataContent)
 

Static Public Member Functions

static AuthenticationPtr create (ParamMap &params)
 
static AuthenticationPtr create (const std::string &authParamsString)
 
static AuthenticationPtr create (const std::string &username, const std::string &password)
 
static AuthenticationPtr create (const std::string &username, const std::string &password, const std::string &method)
 
- Static Public Member Functions inherited from pulsar::Authentication
static ParamMap parseDefaultFormatAuthParams (const std::string &authParamsString)
 

Additional Inherited Members

- Protected Attributes inherited from pulsar::Authentication
AuthenticationDataPtr authData_
 

Detailed Description

Basic based implementation of Pulsar client authentication

Member Function Documentation

◆ create() [1/4]

static AuthenticationPtr pulsar::AuthBasic::create ( const std::string &  authParamsString)
static

Create an AuthBasic with an authentication parameter string

Parameters
authParamsStringthe JSON format string: {"username": "admin", "password": "123456"}

◆ create() [2/4]

static AuthenticationPtr pulsar::AuthBasic::create ( const std::string &  username,
const std::string &  password 
)
static

Create an AuthBasic with the required parameters

◆ create() [3/4]

static AuthenticationPtr pulsar::AuthBasic::create ( const std::string &  username,
const std::string &  password,
const std::string &  method 
)
static

Create an AuthBasic with the required parameters

◆ create() [4/4]

static AuthenticationPtr pulsar::AuthBasic::create ( ParamMap &  params)
static

Create an AuthBasic with a ParamMap

It is equal to create(params[“username”], params[“password”])

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

◆ getAuthData()

Result pulsar::AuthBasic::getAuthData ( AuthenticationDataPtr &  authDataBasic)
overridevirtual

Get AuthenticationData from the current instance

Parameters
[out]authDataBasicthe shared pointer of AuthenticationData. The content of AuthenticationData is changed to the internal data of the current instance.
Returns
ResultOk

Reimplemented from pulsar::Authentication.

◆ getAuthMethodName()

const std::string pulsar::AuthBasic::getAuthMethodName ( ) const
overridevirtual
Returns
“basic”

Implements pulsar::Authentication.


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