pulsar-client-cpp
|
#include <Authentication.h>
Public Member Functions | |
AuthToken (AuthenticationDataPtr &) | |
const std::string | getAuthMethodName () const |
Result | getAuthData (AuthenticationDataPtr &authDataToken) |
Static Public Member Functions | |
static AuthenticationPtr | create (ParamMap ¶ms) |
static AuthenticationPtr | create (const std::string &authParamsString) |
static AuthenticationPtr | createWithToken (const std::string &token) |
static AuthenticationPtr | create (const TokenSupplier &tokenSupplier) |
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_ |
Token based implementation of Pulsar client authentication
|
static |
Create an AuthToken with an authentication parameter string
|
static |
Create an authentication provider for token based authentication
tokenSupplier | a supplier of the client auth token |
|
static |
Create an AuthToken with a ParamMap
parameters | it must contain a key-value, where key means how to get the token and value means the token source |
If the key is “token”, the value is the token
If the key is “file”, the value is the file that contains the token
If the key is “env”, the value is the environment variable whose value is the token
Otherwise, a std::runtime_error
error is thrown.
|
static |
Create an authentication provider for token based authentication
token | a string containing the auth token |
|
virtual |
Get AuthenticationData from the current instance
[out] | authDataToken | the shared pointer of AuthenticationData. The content of AuthenticationData is changed to the internal data of the current instance. |
Reimplemented from pulsar::Authentication.
|
virtual |
Implements pulsar::Authentication.