Skip to content

Commit d37f630

Browse files
authored
Update Readme and Examples (#752)
1 parent 78edccb commit d37f630

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

.github/actions/maven-publish/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ runs:
3636

3737
- name: Publish Android/Java Packages to Maven
3838
shell: bash
39-
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository -PisSnapshot=false --stacktrace
39+
run: ./gradlew publishToSonatype closeSonatypeStagingRepository -PisSnapshot=false --stacktrace
4040
env:
4141
JAVA_HOME: ${{ env.JAVA_HOME }}
4242
MAVEN_USERNAME: ${{ inputs.ossr-username }}

EXAMPLES.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,22 @@ AuthAPI auth = AuthAPI.newBuilder("DOMAIN", "CLIENT-ID", "CLIENT-SECRET")
3838
.withHttpClient(client)
3939
.build();
4040

41+
```
42+
43+
```java
44+
4145
ManagementAPI mgmt = ManagementAPI.newBuilder("DOMAIN", "API-TOKEN")
4246
.withHttpClient(client)
4347
.build();
48+
49+
// OR
50+
51+
TokenProvider tokenProvider = SimpleTokenProvider.create("API-TOKEN");
52+
53+
ManagementAPI mgmt = ManagementAPI.newBuilder("DOMAIN", tokenProvider)
54+
.withHttpClient(client)
55+
.build();
56+
4457
```
4558

4659
If the `DefaultHttpClient` does not support your required networking client configuration, you may choose to implement

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,15 @@ Create a `ManagementAPI` instance by providing the domain from the [Application
6666
ManagementAPI mgmt = ManagementAPI.newBuilder("{YOUR_DOMAIN}", "{YOUR_API_TOKEN}").build();
6767
```
6868

69+
OR
70+
71+
Create a `ManagementAPI` instance by providing the domain from the [Application dashboard](https://manage.auth0.com/#/applications) and Token Provider.
72+
73+
```java
74+
TokenProvider tokenProvider = SimpleTokenProvider.create("{YOUR_API_TOKEN}");
75+
ManagementAPI mgmt = ManagementAPI.newBuilder("{YOUR_DOMAIN}", TokenProvider).build();
76+
```
77+
6978
The Management API is organized by entities represented by the Auth0 Management API objects.
7079

7180
```java

0 commit comments

Comments
 (0)