pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhai...@apache.org
Subject [pulsar.wiki] branch master updated: Updated PIP 30: change authentication provider API to support mutual authentication (markdown)
Date Thu, 28 Feb 2019 12:45:29 GMT
This is an automated email from the ASF dual-hosted git repository.

zhaijia pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.wiki.git


The following commit(s) were added to refs/heads/master by this push:
     new c74b1cb  Updated PIP 30: change authentication provider API to support mutual authentication
(markdown)
c74b1cb is described below

commit c74b1cbe8a921d7b96729551a7c9f7829022f739
Author: Jia Zhai <zhaijia@apache.org>
AuthorDate: Thu Feb 28 20:45:28 2019 +0800

    Updated PIP 30: change authentication provider API to support mutual authentication (markdown)
---
 ...-authentication-provider-API-to-support-mutual-authentication.md | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/PIP-30:-change-authentication-provider-API-to-support-mutual-authentication.md
b/PIP-30:-change-authentication-provider-API-to-support-mutual-authentication.md
index 0d7fe73..69eb4c5 100644
--- a/PIP-30:-change-authentication-provider-API-to-support-mutual-authentication.md
+++ b/PIP-30:-change-authentication-provider-API-to-support-mutual-authentication.md
@@ -158,12 +158,15 @@ interface AuthState {
     AuthenticationData getAuthData();
     String getAuthRole();
 
+
     /**
       * Returns null if authentication has completed, and no auth data is required to send
back to client.
       * Returns the auth data back to client, if authentication has not completed.
       */
     byte[] authenticate(byte[] authData);
 
+    boolean isComplete();
+
 }
 ```
 
@@ -177,9 +180,8 @@ AuthState authState = authenticationProvider.newAuthState();
 
 byte[] clientAuthData = connect.getAuthData().toByteArray();
 byte[] brokerAuthData = authState.authenticate(clientAuthData);
-if (null == brokerAuthData) {
+if (authState.isComplete()) {
      // authentication has completed.
-     authData = authState.getAuthenticateData();
      authRole = authState.getAuthRole();
      // we are done here
 } else {


Mime
View raw message