Browse Source

Implement SASL/OAUTHBEARER support

Tweak documentation
Mike Kaminski 7 years ago
parent
commit
b69ad39564
2 changed files with 3 additions and 5 deletions
  1. 0 1
      broker.go
  2. 3 4
      config.go

+ 0 - 1
broker.go

@@ -932,7 +932,6 @@ func (b *Broker) sendSASLOAuthBearerClientResponse(bearerToken string) (int, err
 
 	// Initial client response as described by RFC-7628
 	// https://tools.ietf.org/html/rfc7628
-
 	oauthRequest := []byte(fmt.Sprintf("n,,\x01auth=Bearer %s\x01\x01", bearerToken))
 
 	rb := &SaslAuthenticateRequest{oauthRequest}

+ 3 - 4
config.go

@@ -64,10 +64,9 @@ type Config struct {
 			//username and password for SASL/PLAIN authentication
 			User     string
 			Password string
-			// TokenProvider is a bearer token generator for the OAUTHBEARER
-			// flow. You can define an instance of OAuthBearerTokenProvider
-			// that generates authentication tokens according to your Kafka
-			// cluster's configuration.
+			// TokenProvider is a user-defined callback for generating
+			// authentication tokens. See the OAuthBearerTokenProvider docs
+			// for proper implementation guidelines.
 			TokenProvider OAuthBearerTokenProvider
 		}