Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ pomName=Authsignal Server SDK for Java
pomArtifactId=authsignal-java
pomGroup=com.authsignal
pomPackaging=jar
versionName=2.2.2
versionName=2.3.0
versionCode=2025
5 changes: 5 additions & 0 deletions src/main/java/com/authsignal/AuthsignalClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public class AuthsignalClient {

private static final String DEFAULT_API_URL = "https://api.authsignal.com/v1";
private static final int DEFAULT_RETRIES = 2;
private static final String VERSION = "2.3.0";

public Webhook webhook;

Expand Down Expand Up @@ -119,6 +120,7 @@ private CompletableFuture<HttpResponse<String>> getRequest(String path) {
HttpRequest request = HttpRequest.newBuilder()
.uri(uri)
.header("Authorization", getBasicAuthHeader())
.header("X-Authsignal-Version", VERSION)
.GET()
.build();

Expand All @@ -137,6 +139,7 @@ private CompletableFuture<HttpResponse<String>> postRequest(String path, String
.uri(uri)
.header("Authorization", getBasicAuthHeader())
.header("Content-Type", "application/json")
.header("X-Authsignal-Version", VERSION)
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();

Expand All @@ -155,6 +158,7 @@ private CompletableFuture<HttpResponse<String>> patchRequest(String path, String
.uri(uri)
.header("Authorization", getBasicAuthHeader())
.header("Content-Type", "application/json")
.header("X-Authsignal-Version", VERSION)
.method("PATCH", HttpRequest.BodyPublishers.ofString(body))
.build();

Expand All @@ -172,6 +176,7 @@ private CompletableFuture<HttpResponse<String>> deleteRequest(String path) {
HttpRequest request = HttpRequest.newBuilder()
.uri(uri)
.header("Authorization", getBasicAuthHeader())
.header("X-Authsignal-Version", VERSION)
.DELETE()
.build();

Expand Down
Loading