类 AuthenticationFactory
java.lang.Object
org.apache.pulsar.client.api.AuthenticationFactory
Factory class that allows to create
Authentication
instances
for all the supported authentication methods.-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static Authentication
Create an instance of theAuthentication
object by using the plugin class name.static Authentication
Create an instance of the Authentication-Plugin.static Authentication
Create an authentication provider for TLS based authentication.static Authentication
Create an authentication provider for token based authentication.static Authentication
Create an authentication provider for token based authentication.
-
构造器详细资料
-
AuthenticationFactory
public AuthenticationFactory()
-
-
方法详细资料
-
token
Create an authentication provider for token based authentication.- 参数:
token
- the client auth token- 返回:
- the Authentication object initialized with the token credentials
-
token
Create an authentication provider for token based authentication.- 参数:
tokenSupplier
- a supplier of the client auth token- 返回:
- the Authentication object initialized with the token credentials
-
TLS
Create an authentication provider for TLS based authentication.- 参数:
certFilePath
- the path to the TLS client public keykeyFilePath
- the path to the TLS client private key- 返回:
- the Authentication object initialized with the TLS credentials
-
create
public static Authentication create(String authPluginClassName, String authParamsString) throws PulsarClientException.UnsupportedAuthenticationException Create an instance of theAuthentication
object by using the plugin class name.- 参数:
authPluginClassName
- name of the Authentication-Plugin you want to useauthParamsString
- string which represents parameters for the Authentication-Plugin, e.g., "key1:val1,key2:val2"- 返回:
- instance of the Authentication object
- 抛出:
PulsarClientException.UnsupportedAuthenticationException
-
create
public static Authentication create(String authPluginClassName, Map<String, String> authParams) throws PulsarClientException.UnsupportedAuthenticationExceptionCreate an instance of the Authentication-Plugin.- 参数:
authPluginClassName
- name of the Authentication-Plugin you want to useauthParams
- map which represents parameters for the Authentication-Plugin- 返回:
- instance of the Authentication-Plugin
- 抛出:
PulsarClientException.UnsupportedAuthenticationException
-