ivankelly commented on a change in pull request #3677: PIP-30: interface and 
mutual change authentication
URL: https://github.com/apache/pulsar/pull/3677#discussion_r262013804
 
 

 ##########
 File path: 
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationProvider.java
 ##########
 @@ -56,4 +60,18 @@
      */
     String authenticate(AuthenticationDataSource authData) throws 
AuthenticationException;
 
+    /**
+     * Create an authentication data provider which provides the data that 
this broker will be sent to the client.
+     */
+    default AuthenticationDataSource newAuthDataSource(AuthData authData,
+                                                       SocketAddress 
remoteAddress,
+                                                       SSLSession sslSession) 
throws IOException {
+        return new AuthenticationDataCommand(
+            new String(authData.getBytes(), Charset.forName("UTF-8")), 
remoteAddress, sslSession);
+    }
+
+    default AuthenticationState newAuthState(AuthenticationDataSource 
authenticationDataSource) {
 
 Review comment:
   Needs a javadoc

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to