Custome authentication Plugin Not Working #23270
Unanswered
urdogan0000
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I create my customAuthenticationPlugin for broker and client.My pulsar container run and up with this custom AuthenticationPlugin when ı try to connect with client it gives an error like,
//
Caused by: org.apache.pulsar.client.api.PulsarClientException$UnsupportedAuthenticationException: org.apache.pulsar.client.api.PulsarClientException$UnsupportedAuthenticationException: java.lang.NullPointerException: Cannot invoke "com.google.gson.JsonObject.has(String)" because "params" is null
at org.apache.pulsar.client.api.AuthenticationFactory.create(AuthenticationFactory.java:92) ~[org.apache.pulsar-pulsar-client-api-3.2.3.jar:3.2.3]
((
My custom plugin
public class BasicAuthProvider implements AuthenticationProvider {
static final String HTTP_HEADER_NAME = "Authorization";
static final String HTTP_HEADER_VALUE_PREFIX = "Basic";
private static final Logger log = LoggerFactory.getLogger(BasicAuthProvider.class);
private String apiEndpoint;
private OkHttpClient httpClient;
}
public class AuthenticationBasicAuth implements Authentication, EncodedAuthenticationParameterSupport {
}
public class CustomDataBasic implements AuthenticationDataProvider {
private static final String HTTP_HEADER_NAME = "Authorization";
private final String commandAuthToken;
private final Map<String, String> headers;
}
Beta Was this translation helpful? Give feedback.
All reactions