| 11 | |
| 12 | |
| 13 | public class App { |
| 14 | public String getGreeting() { |
| 15 | return null; |
| 16 | } |
| 17 | |
| 18 | public static void main(String[] args) throws Exception { |
| 19 | System.out.println(new App().getGreeting()); |
| 20 | |
| 21 | String issuerUrl = "https://auth.streamnative.cloud/"; |
| 22 | String credentialsUrl = "file://YOUR-KEY-FILE-PATH"; |
| 23 | String audience = "urn:sn:pulsar:o-whe2d:free"; |
| 24 | |
| 25 | PulsarClient client = PulsarClient.builder() |
| 26 | .serviceUrl("") |
| 27 | .authentication( |
| 28 | AuthenticationFactoryOAuth2.clientCredentials(new URL(issuerUrl), new URL(credentialsUrl), audience)) |
| 29 | .build(); |
| 30 | |
| 31 | Producer producer = client.newProducer().create(); |
| 32 | |
| 33 | client.close(); |
| 34 | } |
| 35 | } |
nothing calls this directly
no outgoing calls
no test coverage detected