nodece commented on code in PR #457:
URL: https://github.com/apache/pulsar-site/pull/457#discussion_r1133393824
##########
docs/security-athenz.md:
##########
@@ -159,18 +159,19 @@ const client = new Pulsar.Client({
<TabItem value="Go">
```go
-provider := pulsar.NewAuthenticationAthenz(
- "pulsar",
- "shopping",
- "some_app",
- "file:///path/to/private.pem",
- "v1",
- "",
- "http://localhost:9998")
-client, err := pulsarNewClient(ClientOptions{
- URL: "pulsar://my-broker.com:6650",
- Authentication: basicAuth,
- })
+authParams := map[string]string{
Review Comment:
Could you use the old way to create the provider?
##########
docs/security-athenz.md:
##########
@@ -159,18 +159,19 @@ const client = new Pulsar.Client({
<TabItem value="Go">
```go
-provider := pulsar.NewAuthenticationAthenz(
- "pulsar",
- "shopping",
- "some_app",
- "file:///path/to/private.pem",
- "v1",
- "",
- "http://localhost:9998")
-client, err := pulsarNewClient(ClientOptions{
- URL: "pulsar://my-broker.com:6650",
- Authentication: basicAuth,
- })
+authParams := map[string]string{
+ "ztsUrl": "http://localhost:9998",
+ "providerDomain": "pulsar",
+ "tenantDomain": "shopping",
+ "tenantService": "some_app",
+ "privateKey": "file:///path/to/private.pem",
+ "keyId": "v1",
+}
+
+client, err := pulsar.NewClient(ClientOptions{
Review Comment:
```suggestion
client, err := pulsar.NewClient(pulsar.ClientOptions{
```
##########
docs/security-athenz.md:
##########
@@ -212,6 +213,24 @@ PulsarClient client = PulsarClient.builder()
.build();
```
+</TabItem>
+<TabItem value="Go">
+
+```go
+authParams := map[string]string{
+ "ztsUrl": "http://localhost:9998",
+ "providerDomain": "pulsar",
+ "x509CertChain": "file:///path/to/x509cert.pem",
+ "privateKey": "file:///path/to/private.pem",
+ "caCert": "file:///path/to/cacert.pem",
+}
+
+client, err := pulsar.NewClient(ClientOptions{
Review Comment:
```suggestion
client, err := pulsar.NewClient(pulsar.ClientOptions{
```
##########
docs/security-athenz.md:
##########
@@ -212,6 +213,24 @@ PulsarClient client = PulsarClient.builder()
.build();
```
+</TabItem>
+<TabItem value="Go">
+
+```go
+authParams := map[string]string{
Review Comment:
Same above.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]