Skip to content

Commit 71b0dd7

Browse files
authoredJun 15, 2022
[fix][doc] Add an import statement to the Java code sample for Oauth2 (#16048)
1 parent 705574a commit 71b0dd7

File tree

19 files changed

+138
-73
lines changed

19 files changed

+138
-73
lines changed
 

‎site2/docs/concepts-messaging.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,7 @@ There are diverse system topics depending on namespaces. The following table out
868868
| Namespace | TopicName | Domain | Count | Usage |
869869
|-----------|-----------|--------|-------|-------|
870870
| pulsar/system | `transaction_coordinator_assign_${id}` | Persistent | Default 16 | Transaction coordinator |
871-
| pulsar/system | `_transaction_log${tc_id}` | Persistent | Default 16 | Transaction log |
871+
| pulsar/system | `__transaction_log_${tc_id}` | Persistent | Default 16 | Transaction log |
872872
| pulsar/system | `resource-usage` | Non-persistent | Default 4 | Resource group service |
873873
| host/port | `heartbeat` | Persistent | 1 | Heartbeat detection |
874874
| User-defined-ns | [`__change_events`](concepts-multi-tenancy.md#namespace-change-events-and-topic-level-policies) | Persistent | Default 4 | Topic events |

‎site2/docs/security-oauth2.md

+11-5
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The authentication type determines how to obtain an access token through an OAut
1818

1919
:::note
2020

21-
Currently, the Pulsar Java client only supports the `client_credentials` authentication type .
21+
Currently, the Pulsar Java client only supports the `client_credentials` authentication type.
2222

2323
:::
2424

@@ -83,6 +83,8 @@ You can use the factory method to configure authentication for Pulsar Java clien
8383

8484
```java
8585

86+
import org.apache.pulsar.client.impl.auth.oauth2.AuthenticationFactoryOAuth2;
87+
8688
URL issuerUrl = new URL("https://dev-kt-aa9ne.us.auth0.com");
8789
URL credentialsUrl = new URL("file:///path/to/KeyFile.json");
8890
String audience = "https://dev-kt-aa9ne.us.auth0.com/api/v2/";
@@ -213,7 +215,11 @@ This example shows how to configure OAuth2 authentication in Node.js client.
213215

214216
```
215217

216-
> Note: The support for OAuth2 authentication is only available in Node.js client 1.6.2 and later versions.
218+
:::note
219+
220+
The support for OAuth2 authentication is only available in Node.js client 1.6.2 and later versions.
221+
222+
:::
217223

218224
## Broker configuration
219225
To enable OAuth2 authentication in brokers, add the following parameters to the `broker.conf` or `standalone.conf` file.
@@ -251,7 +257,7 @@ tenants list
251257

252258
```
253259

254-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
260+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
255261
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).
256262

257263
### pulsar-client
@@ -270,7 +276,7 @@ produce test-topic -m "test-message" -n 10
270276

271277
```
272278

273-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
279+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
274280
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).
275281

276282
### pulsar-perf
@@ -288,5 +294,5 @@ bin/pulsar-perf produce --service-url pulsar+ssl://streamnative.cloud:6651 \
288294

289295
```
290296

291-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
297+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
292298
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).

‎site2/website/versioned_docs/version-2.10.0/security-oauth2.md

+11-5
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The authentication type determines how to obtain an access token through an OAut
1919

2020
:::note
2121

22-
Currently, the Pulsar Java client only supports the `client_credentials` authentication type .
22+
Currently, the Pulsar Java client only supports the `client_credentials` authentication type.
2323

2424
:::
2525

@@ -84,6 +84,8 @@ You can use the factory method to configure authentication for Pulsar Java clien
8484

8585
```java
8686

87+
import org.apache.pulsar.client.impl.auth.oauth2.AuthenticationFactoryOAuth2;
88+
8789
URL issuerUrl = new URL("https://dev-kt-aa9ne.us.auth0.com");
8890
URL credentialsUrl = new URL("file:///path/to/KeyFile.json");
8991
String audience = "https://dev-kt-aa9ne.us.auth0.com/api/v2/";
@@ -214,7 +216,11 @@ This example shows how to configure OAuth2 authentication in Node.js client.
214216

215217
```
216218

217-
> Note: The support for OAuth2 authentication is only available in Node.js client 1.6.2 and later versions.
219+
:::note
220+
221+
The support for OAuth2 authentication is only available in Node.js client 1.6.2 and later versions.
222+
223+
:::
218224

219225
## CLI configuration
220226

@@ -235,7 +241,7 @@ tenants list
235241

236242
```
237243

238-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
244+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
239245
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).
240246

241247
### pulsar-client
@@ -254,7 +260,7 @@ produce test-topic -m "test-message" -n 10
254260

255261
```
256262

257-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
263+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
258264
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).
259265

260266
### pulsar-perf
@@ -272,5 +278,5 @@ bin/pulsar-perf produce --service-url pulsar+ssl://streamnative.cloud:6651 \
272278

273279
```
274280

275-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
281+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
276282
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).

‎site2/website/versioned_docs/version-2.6.1/security-oauth2.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ This library allows you to authenticate the Pulsar client by using an access tok
1818
The authentication type determines how to obtain an access token through an OAuth 2.0 authorization flow.
1919

2020
#### Note
21-
> Currently, the Pulsar Java client only supports the `client_credentials` authentication type .
21+
> Currently, the Pulsar Java client only supports the `client_credentials` authentication type.
2222
2323
#### Client credentials
2424

@@ -80,6 +80,8 @@ You can use the factory method to configure authentication for Pulsar Java clien
8080

8181
```java
8282

83+
import org.apache.pulsar.client.impl.auth.oauth2.AuthenticationFactoryOAuth2;
84+
8385
String issuerUrl = "https://dev-kt-aa9ne.us.auth0.com";
8486
String credentialsUrl = "file:///path/to/KeyFile.json";
8587
String audience = "https://dev-kt-aa9ne.us.auth0.com/api/v2/";
@@ -165,7 +167,7 @@ tenants list
165167

166168
```
167169

168-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
170+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
169171
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).
170172

171173
### pulsar-client
@@ -184,7 +186,7 @@ produce test-topic -m "test-message" -n 10
184186

185187
```
186188

187-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
189+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
188190
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).
189191

190192
### pulsar-perf
@@ -202,5 +204,5 @@ bin/pulsar-perf produce --service-url pulsar+ssl://streamnative.cloud:6651 \
202204

203205
```
204206

205-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
207+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
206208
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).

‎site2/website/versioned_docs/version-2.6.2/security-oauth2.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ This library allows you to authenticate the Pulsar client by using an access tok
1818
The authentication type determines how to obtain an access token through an OAuth 2.0 authorization flow.
1919

2020
#### Note
21-
> Currently, the Pulsar Java client only supports the `client_credentials` authentication type .
21+
> Currently, the Pulsar Java client only supports the `client_credentials` authentication type.
2222
2323
#### Client credentials
2424

@@ -80,6 +80,8 @@ You can use the factory method to configure authentication for Pulsar Java clien
8080

8181
```java
8282

83+
import org.apache.pulsar.client.impl.auth.oauth2.AuthenticationFactoryOAuth2;
84+
8385
String issuerUrl = "https://dev-kt-aa9ne.us.auth0.com";
8486
String credentialsUrl = "file:///path/to/KeyFile.json";
8587
String audience = "https://dev-kt-aa9ne.us.auth0.com/api/v2/";
@@ -165,7 +167,7 @@ tenants list
165167

166168
```
167169

168-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
170+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
169171
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).
170172

171173
### pulsar-client
@@ -184,7 +186,7 @@ produce test-topic -m "test-message" -n 10
184186

185187
```
186188

187-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
189+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
188190
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).
189191

190192
### pulsar-perf
@@ -202,5 +204,5 @@ bin/pulsar-perf produce --service-url pulsar+ssl://streamnative.cloud:6651 \
202204

203205
```
204206

205-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
207+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
206208
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).

‎site2/website/versioned_docs/version-2.6.3/security-oauth2.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ This library allows you to authenticate the Pulsar client by using an access tok
1818
The authentication type determines how to obtain an access token through an OAuth 2.0 authorization flow.
1919

2020
#### Note
21-
> Currently, the Pulsar Java client only supports the `client_credentials` authentication type .
21+
> Currently, the Pulsar Java client only supports the `client_credentials` authentication type.
2222
2323
#### Client credentials
2424

@@ -80,6 +80,8 @@ You can use the factory method to configure authentication for Pulsar Java clien
8080

8181
```java
8282

83+
import org.apache.pulsar.client.impl.auth.oauth2.AuthenticationFactoryOAuth2;
84+
8385
String issuerUrl = "https://dev-kt-aa9ne.us.auth0.com";
8486
String credentialsUrl = "file:///path/to/KeyFile.json";
8587
String audience = "https://dev-kt-aa9ne.us.auth0.com/api/v2/";
@@ -165,7 +167,7 @@ tenants list
165167

166168
```
167169

168-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
170+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
169171
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).
170172

171173
### pulsar-client
@@ -184,7 +186,7 @@ produce test-topic -m "test-message" -n 10
184186

185187
```
186188

187-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
189+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
188190
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).
189191

190192
### pulsar-perf
@@ -202,5 +204,5 @@ bin/pulsar-perf produce --service-url pulsar+ssl://streamnative.cloud:6651 \
202204

203205
```
204206

205-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
207+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
206208
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).

‎site2/website/versioned_docs/version-2.6.4/security-oauth2.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ This library allows you to authenticate the Pulsar client by using an access tok
1818
The authentication type determines how to obtain an access token through an OAuth 2.0 authorization flow.
1919

2020
#### Note
21-
> Currently, the Pulsar Java client only supports the `client_credentials` authentication type .
21+
> Currently, the Pulsar Java client only supports the `client_credentials` authentication type.
2222
2323
#### Client credentials
2424

@@ -80,6 +80,8 @@ You can use the factory method to configure authentication for Pulsar Java clien
8080

8181
```java
8282

83+
import org.apache.pulsar.client.impl.auth.oauth2.AuthenticationFactoryOAuth2;
84+
8385
String issuerUrl = "https://dev-kt-aa9ne.us.auth0.com/oauth/token";
8486
String credentialsUrl = "file:///path/to/KeyFile.json";
8587
String audience = "https://dev-kt-aa9ne.us.auth0.com/api/v2/";

‎site2/website/versioned_docs/version-2.7.0/security-oauth2.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ This library allows you to authenticate the Pulsar client by using an access tok
1818
The authentication type determines how to obtain an access token through an OAuth 2.0 authorization flow.
1919

2020
#### Note
21-
> Currently, the Pulsar Java client only supports the `client_credentials` authentication type .
21+
> Currently, the Pulsar Java client only supports the `client_credentials` authentication type.
2222
2323
#### Client credentials
2424

@@ -80,6 +80,8 @@ You can use the factory method to configure authentication for Pulsar Java clien
8080

8181
```java
8282

83+
import org.apache.pulsar.client.impl.auth.oauth2.AuthenticationFactoryOAuth2;
84+
8385
String issuerUrl = "https://dev-kt-aa9ne.us.auth0.com";
8486
String credentialsUrl = "file:///path/to/KeyFile.json";
8587
String audience = "https://dev-kt-aa9ne.us.auth0.com/api/v2/";

‎site2/website/versioned_docs/version-2.7.1/security-oauth2.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ This library allows you to authenticate the Pulsar client by using an access tok
1818
The authentication type determines how to obtain an access token through an OAuth 2.0 authorization flow.
1919

2020
#### Note
21-
> Currently, the Pulsar Java client only supports the `client_credentials` authentication type .
21+
> Currently, the Pulsar Java client only supports the `client_credentials` authentication type.
2222
2323
#### Client credentials
2424

@@ -80,6 +80,8 @@ You can use the factory method to configure authentication for Pulsar Java clien
8080

8181
```java
8282

83+
import org.apache.pulsar.client.impl.auth.oauth2.AuthenticationFactoryOAuth2;
84+
8385
String issuerUrl = "https://dev-kt-aa9ne.us.auth0.com";
8486
String credentialsUrl = "file:///path/to/KeyFile.json";
8587
String audience = "https://dev-kt-aa9ne.us.auth0.com/api/v2/";

‎site2/website/versioned_docs/version-2.7.2/security-oauth2.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ This library allows you to authenticate the Pulsar client by using an access tok
1818
The authentication type determines how to obtain an access token through an OAuth 2.0 authorization flow.
1919

2020
#### Note
21-
> Currently, the Pulsar Java client only supports the `client_credentials` authentication type .
21+
> Currently, the Pulsar Java client only supports the `client_credentials` authentication type.
2222
2323
#### Client credentials
2424

@@ -80,6 +80,8 @@ You can use the factory method to configure authentication for Pulsar Java clien
8080

8181
```java
8282

83+
import org.apache.pulsar.client.impl.auth.oauth2.AuthenticationFactoryOAuth2;
84+
8385
String issuerUrl = "https://dev-kt-aa9ne.us.auth0.com";
8486
String credentialsUrl = "file:///path/to/KeyFile.json";
8587
String audience = "https://dev-kt-aa9ne.us.auth0.com/api/v2/";
@@ -186,7 +188,7 @@ tenants list
186188

187189
```
188190

189-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
191+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
190192
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).
191193

192194
### pulsar-client
@@ -205,7 +207,7 @@ produce test-topic -m "test-message" -n 10
205207

206208
```
207209

208-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
210+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
209211
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).
210212

211213
### pulsar-perf
@@ -223,5 +225,5 @@ bin/pulsar-perf produce --service-url pulsar+ssl://streamnative.cloud:6651 \
223225

224226
```
225227

226-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
228+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
227229
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).

‎site2/website/versioned_docs/version-2.7.3/security-oauth2.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ This library allows you to authenticate the Pulsar client by using an access tok
1818
The authentication type determines how to obtain an access token through an OAuth 2.0 authorization flow.
1919

2020
#### Note
21-
> Currently, the Pulsar Java client only supports the `client_credentials` authentication type .
21+
> Currently, the Pulsar Java client only supports the `client_credentials` authentication type.
2222
2323
#### Client credentials
2424

@@ -80,6 +80,8 @@ You can use the factory method to configure authentication for Pulsar Java clien
8080

8181
```java
8282

83+
import org.apache.pulsar.client.impl.auth.oauth2.AuthenticationFactoryOAuth2;
84+
8385
String issuerUrl = "https://dev-kt-aa9ne.us.auth0.com";
8486
String credentialsUrl = "file:///path/to/KeyFile.json";
8587
String audience = "https://dev-kt-aa9ne.us.auth0.com/api/v2/";
@@ -186,7 +188,7 @@ tenants list
186188

187189
```
188190

189-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
191+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
190192
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).
191193

192194
### pulsar-client
@@ -205,7 +207,7 @@ produce test-topic -m "test-message" -n 10
205207

206208
```
207209

208-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
210+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
209211
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).
210212

211213
### pulsar-perf
@@ -223,5 +225,5 @@ bin/pulsar-perf produce --service-url pulsar+ssl://streamnative.cloud:6651 \
223225

224226
```
225227

226-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
228+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
227229
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).

‎site2/website/versioned_docs/version-2.7.4/security-oauth2.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ This library allows you to authenticate the Pulsar client by using an access tok
1818
The authentication type determines how to obtain an access token through an OAuth 2.0 authorization flow.
1919

2020
#### Note
21-
> Currently, the Pulsar Java client only supports the `client_credentials` authentication type .
21+
> Currently, the Pulsar Java client only supports the `client_credentials` authentication type.
2222
2323
#### Client credentials
2424

@@ -80,6 +80,8 @@ You can use the factory method to configure authentication for Pulsar Java clien
8080

8181
```java
8282

83+
import org.apache.pulsar.client.impl.auth.oauth2.AuthenticationFactoryOAuth2;
84+
8385
String issuerUrl = "https://dev-kt-aa9ne.us.auth0.com";
8486
String credentialsUrl = "file:///path/to/KeyFile.json";
8587
String audience = "https://dev-kt-aa9ne.us.auth0.com/api/v2/";
@@ -186,7 +188,7 @@ tenants list
186188

187189
```
188190

189-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
191+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
190192
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).
191193

192194
### pulsar-client
@@ -205,7 +207,7 @@ produce test-topic -m "test-message" -n 10
205207

206208
```
207209

208-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
210+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
209211
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).
210212

211213
### pulsar-perf
@@ -223,5 +225,5 @@ bin/pulsar-perf produce --service-url pulsar+ssl://streamnative.cloud:6651 \
223225

224226
```
225227

226-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
228+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
227229
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).

‎site2/website/versioned_docs/version-2.8.0/security-oauth2.md

+10-5
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ This library allows you to authenticate the Pulsar client by using an access tok
1717

1818
The authentication type determines how to obtain an access token through an OAuth 2.0 authorization flow.
1919

20-
#### Note
21-
> Currently, the Pulsar Java client only supports the `client_credentials` authentication type .
20+
:::note
21+
22+
Currently, the Pulsar Java client only supports the `client_credentials` authentication type.
23+
24+
:::
2225

2326
#### Client credentials
2427

@@ -80,6 +83,8 @@ You can use the factory method to configure authentication for Pulsar Java clien
8083

8184
```java
8285

86+
import org.apache.pulsar.client.impl.auth.oauth2.AuthenticationFactoryOAuth2;
87+
8388
String issuerUrl = "https://dev-kt-aa9ne.us.auth0.com";
8489
String credentialsUrl = "file:///path/to/KeyFile.json";
8590
String audience = "https://dev-kt-aa9ne.us.auth0.com/api/v2/";
@@ -186,7 +191,7 @@ tenants list
186191

187192
```
188193

189-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
194+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
190195
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).
191196

192197
### pulsar-client
@@ -205,7 +210,7 @@ produce test-topic -m "test-message" -n 10
205210

206211
```
207212

208-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
213+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
209214
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).
210215

211216
### pulsar-perf
@@ -223,5 +228,5 @@ bin/pulsar-perf produce --service-url pulsar+ssl://streamnative.cloud:6651 \
223228

224229
```
225230

226-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
231+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
227232
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).

‎site2/website/versioned_docs/version-2.8.1/security-oauth2.md

+10-5
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ This library allows you to authenticate the Pulsar client by using an access tok
1717

1818
The authentication type determines how to obtain an access token through an OAuth 2.0 authorization flow.
1919

20-
#### Note
21-
> Currently, the Pulsar Java client only supports the `client_credentials` authentication type .
20+
:::note
21+
22+
Currently, the Pulsar Java client only supports the `client_credentials` authentication type.
23+
24+
:::
2225

2326
#### Client credentials
2427

@@ -80,6 +83,8 @@ You can use the factory method to configure authentication for Pulsar Java clien
8083

8184
```java
8285

86+
import org.apache.pulsar.client.impl.auth.oauth2.AuthenticationFactoryOAuth2;
87+
8388
String issuerUrl = "https://dev-kt-aa9ne.us.auth0.com";
8489
String credentialsUrl = "file:///path/to/KeyFile.json";
8590
String audience = "https://dev-kt-aa9ne.us.auth0.com/api/v2/";
@@ -186,7 +191,7 @@ tenants list
186191

187192
```
188193

189-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
194+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
190195
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).
191196

192197
### pulsar-client
@@ -205,7 +210,7 @@ produce test-topic -m "test-message" -n 10
205210

206211
```
207212

208-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
213+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
209214
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).
210215

211216
### pulsar-perf
@@ -223,5 +228,5 @@ bin/pulsar-perf produce --service-url pulsar+ssl://streamnative.cloud:6651 \
223228

224229
```
225230

226-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
231+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
227232
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).

‎site2/website/versioned_docs/version-2.8.2/security-oauth2.md

+10-5
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ This library allows you to authenticate the Pulsar client by using an access tok
1717

1818
The authentication type determines how to obtain an access token through an OAuth 2.0 authorization flow.
1919

20-
#### Note
21-
> Currently, the Pulsar Java client only supports the `client_credentials` authentication type .
20+
:::note
21+
22+
Currently, the Pulsar Java client only supports the `client_credentials` authentication type.
23+
24+
:::
2225

2326
#### Client credentials
2427

@@ -80,6 +83,8 @@ You can use the factory method to configure authentication for Pulsar Java clien
8083

8184
```java
8285

86+
import org.apache.pulsar.client.impl.auth.oauth2.AuthenticationFactoryOAuth2;
87+
8388
String issuerUrl = "https://dev-kt-aa9ne.us.auth0.com";
8489
String credentialsUrl = "file:///path/to/KeyFile.json";
8590
String audience = "https://dev-kt-aa9ne.us.auth0.com/api/v2/";
@@ -186,7 +191,7 @@ tenants list
186191

187192
```
188193

189-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
194+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
190195
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).
191196

192197
### pulsar-client
@@ -205,7 +210,7 @@ produce test-topic -m "test-message" -n 10
205210

206211
```
207212

208-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
213+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
209214
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).
210215

211216
### pulsar-perf
@@ -223,5 +228,5 @@ bin/pulsar-perf produce --service-url pulsar+ssl://streamnative.cloud:6651 \
223228

224229
```
225230

226-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
231+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
227232
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).

‎site2/website/versioned_docs/version-2.8.3/security-oauth2.md

+10-5
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ This library allows you to authenticate the Pulsar client by using an access tok
1717

1818
The authentication type determines how to obtain an access token through an OAuth 2.0 authorization flow.
1919

20-
#### Note
21-
> Currently, the Pulsar Java client only supports the `client_credentials` authentication type .
20+
:::note
21+
22+
Currently, the Pulsar Java client only supports the `client_credentials` authentication type.
23+
24+
:::
2225

2326
#### Client credentials
2427

@@ -80,6 +83,8 @@ You can use the factory method to configure authentication for Pulsar Java clien
8083

8184
```java
8285

86+
import org.apache.pulsar.client.impl.auth.oauth2.AuthenticationFactoryOAuth2;
87+
8388
String issuerUrl = "https://dev-kt-aa9ne.us.auth0.com";
8489
String credentialsUrl = "file:///path/to/KeyFile.json";
8590
String audience = "https://dev-kt-aa9ne.us.auth0.com/api/v2/";
@@ -186,7 +191,7 @@ tenants list
186191

187192
```
188193

189-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
194+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
190195
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).
191196

192197
### pulsar-client
@@ -205,7 +210,7 @@ produce test-topic -m "test-message" -n 10
205210

206211
```
207212

208-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
213+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
209214
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).
210215

211216
### pulsar-perf
@@ -223,5 +228,5 @@ bin/pulsar-perf produce --service-url pulsar+ssl://streamnative.cloud:6651 \
223228

224229
```
225230

226-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
231+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
227232
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).

‎site2/website/versioned_docs/version-2.9.0/security-oauth2.md

+10-5
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ This library allows you to authenticate the Pulsar client by using an access tok
1717

1818
The authentication type determines how to obtain an access token through an OAuth 2.0 authorization flow.
1919

20-
#### Note
21-
> Currently, the Pulsar Java client only supports the `client_credentials` authentication type .
20+
:::note
21+
22+
Currently, the Pulsar Java client only supports the `client_credentials` authentication type.
23+
24+
:::
2225

2326
#### Client credentials
2427

@@ -80,6 +83,8 @@ You can use the factory method to configure authentication for Pulsar Java clien
8083

8184
```java
8285

86+
import org.apache.pulsar.client.impl.auth.oauth2.AuthenticationFactoryOAuth2;
87+
8388
URL issuerUrl = new URL("https://dev-kt-aa9ne.us.auth0.com");
8489
URL credentialsUrl = new URL("file:///path/to/KeyFile.json");
8590
String audience = "https://dev-kt-aa9ne.us.auth0.com/api/v2/";
@@ -186,7 +191,7 @@ tenants list
186191

187192
```
188193

189-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
194+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
190195
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).
191196

192197
### pulsar-client
@@ -205,7 +210,7 @@ produce test-topic -m "test-message" -n 10
205210

206211
```
207212

208-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
213+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
209214
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).
210215

211216
### pulsar-perf
@@ -223,5 +228,5 @@ bin/pulsar-perf produce --service-url pulsar+ssl://streamnative.cloud:6651 \
223228

224229
```
225230

226-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
231+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
227232
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).

‎site2/website/versioned_docs/version-2.9.1/security-oauth2.md

+10-5
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ This library allows you to authenticate the Pulsar client by using an access tok
1717

1818
The authentication type determines how to obtain an access token through an OAuth 2.0 authorization flow.
1919

20-
#### Note
21-
> Currently, the Pulsar Java client only supports the `client_credentials` authentication type .
20+
:::note
21+
22+
Currently, the Pulsar Java client only supports the `client_credentials` authentication type.
23+
24+
:::
2225

2326
#### Client credentials
2427

@@ -80,6 +83,8 @@ You can use the factory method to configure authentication for Pulsar Java clien
8083

8184
```java
8285

86+
import org.apache.pulsar.client.impl.auth.oauth2.AuthenticationFactoryOAuth2;
87+
8388
URL issuerUrl = new URL("https://dev-kt-aa9ne.us.auth0.com");
8489
URL credentialsUrl = new URL("file:///path/to/KeyFile.json");
8590
String audience = "https://dev-kt-aa9ne.us.auth0.com/api/v2/";
@@ -186,7 +191,7 @@ tenants list
186191

187192
```
188193

189-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
194+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
190195
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).
191196

192197
### pulsar-client
@@ -205,7 +210,7 @@ produce test-topic -m "test-message" -n 10
205210

206211
```
207212

208-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
213+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
209214
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).
210215

211216
### pulsar-perf
@@ -223,5 +228,5 @@ bin/pulsar-perf produce --service-url pulsar+ssl://streamnative.cloud:6651 \
223228

224229
```
225230

226-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
231+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
227232
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).

‎site2/website/versioned_docs/version-2.9.2/security-oauth2.md

+10-5
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ This library allows you to authenticate the Pulsar client by using an access tok
1717

1818
The authentication type determines how to obtain an access token through an OAuth 2.0 authorization flow.
1919

20-
#### Note
21-
> Currently, the Pulsar Java client only supports the `client_credentials` authentication type .
20+
:::note
21+
22+
Currently, the Pulsar Java client only supports the `client_credentials` authentication type.
23+
24+
:::
2225

2326
#### Client credentials
2427

@@ -80,6 +83,8 @@ You can use the factory method to configure authentication for Pulsar Java clien
8083

8184
```java
8285

86+
import org.apache.pulsar.client.impl.auth.oauth2.AuthenticationFactoryOAuth2;
87+
8388
URL issuerUrl = new URL("https://dev-kt-aa9ne.us.auth0.com");
8489
URL credentialsUrl = new URL("file:///path/to/KeyFile.json");
8590
String audience = "https://dev-kt-aa9ne.us.auth0.com/api/v2/";
@@ -186,7 +191,7 @@ tenants list
186191

187192
```
188193

189-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
194+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
190195
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).
191196

192197
### pulsar-client
@@ -205,7 +210,7 @@ produce test-topic -m "test-message" -n 10
205210

206211
```
207212

208-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
213+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
209214
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).
210215

211216
### pulsar-perf
@@ -223,5 +228,5 @@ bin/pulsar-perf produce --service-url pulsar+ssl://streamnative.cloud:6651 \
223228

224229
```
225230

226-
Set the `admin-url` parameter to the Web service URL. A Web service URLis a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
231+
Set the `admin-url` parameter to the Web service URL. A Web service URL is a combination of the protocol, hostname and port ID, such as `pulsar://localhost:6650`.
227232
Set the `privateKey`, `issuerUrl`, and `audience` parameters to the values based on the configuration in the key file. For details, see [authentication types](#authentication-types).

0 commit comments

Comments
 (0)
Please sign in to comment.