This library implements EdgeGrid authentication for Java.
Before you begin, you need to Create authentication credentials.
In order to use EdgeGrid Client for Java, you need Java version 11+.
You'll need the values for the tokens from your .edgerc file.
ClientCredential credential = ClientCredential.builder()
.accessToken("akaa-xxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxx")
.clientToken("akaa-xxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxx")
.clientSecret("SOMESECRET")
.host("akaa-baseurl-xxxxxxxxxxx-xxxxxxxxxxxxx.luna.akamaiapis.net")
.build();
Example API call:
Request request = Request.builder()
.method("POST")
.uri("https://akaa-baseurl-xxxxxxxxxxx-xxxxxxxxxxxxx.luna.akamaiapis.net/diagnostic-tools/v2/ghost-locations/available")
.body("{ \"field\": \"field value\" }".getBytes())
.header("X-Some-Signed-Header", "header value")
.header("X-Some-Other-Signed-Header", "header value 2")
.build();
This is an example of an API call to List available edge server locations. Change the uri
element to reference an endpoint in any of the Akamai APIs.
This project contains a core implementation module and five bindings to specific HTTP client libraries.
- edgegrid-signer-core is the core signing implementation and base classes used by the individual library implementations.
- edgerc-reader is a configuration file reader that supports
.edgerc
files. These files are basically INI files with certain sections and properties. - edgegrid-signer-apache-http-client is a binding for Apache HTTP Client.
- edgegrid-signer-google-http-client is a binding for Google HTTP Client Library for Java.
- edgegrid-signer-rest-assured is a binding for REST-assured.
- edgegrid-signer-async-http-client is a binding for Async HTTP Client.
Note: A number of similar libraries for signing requests exist for popular programming languages, and you can find them at https://github.com/akamai?q=edgegrid
Michał Wójcik [email protected]
Tatiana Slonimskaia [email protected]
Martin Meyer [email protected]
Maciej Gawinecki
Roberto López López
This is an open-source library, and contributions are welcome. You're welcome to fork this project and send us a pull request.
Find valuable resources on the Akamai Developer website.