Skip to content

Commit 65c3a61

Browse files
committed
Added OAuth authorization to README.md
1 parent a14107d commit 65c3a61

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

+15
Original file line numberDiff line numberDiff line change
@@ -129,3 +129,18 @@ objects and arrays: `o("k1", "v1", "k2", "v2", ...)` and `a("v1", "v2", "v3", ..
129129

130130
Object request = o("types", a("standard"));
131131
JsonObject response = client.callMethod("Company.GetReportSuites", request, JsonObject.class);
132+
133+
### JWT/OAuth authorization
134+
135+
The library supports
136+
[service account authorization](https://marketing.adobe.com/developer/documentation/authentication-1/auth-service-account-1).
137+
In order to use it, you'll need:
138+
139+
* a private key file,
140+
* client id,
141+
* username.
142+
143+
Creating an `AnalyticsClient` authorized with OAuth is simple:
144+
145+
Path privateKeyPath = Paths.get("path/to/my/private/key.pem");
146+
AnalyticsClient client = AnalyticsClient.authenticateWithOAuth(privateKeyPath, "my-client-id", "my-username", "api2.omniture.com");

0 commit comments

Comments
 (0)