Skip to content

Commit

Permalink
Add management key auth support (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
rubyjohn93 authored Mar 15, 2024
1 parent 5c6444b commit 2b5723e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Add this dependency to your project's POM:
<dependency>
<groupId>one.talon</groupId>
<artifactId>talon-one-client</artifactId>
<version>6.0.0</version>
<version>6.0.1</version>
<scope>compile</scope>
</dependency>
```
Expand All @@ -63,7 +63,7 @@ Add this dependency to your project's POM:
Add this dependency to your project's build file:

```groovy
compile "one.talon:talon-one-client:6.0.0"
compile "one.talon:talon-one-client:6.0.1"
```

### Others
Expand All @@ -76,7 +76,7 @@ mvn clean package

Then manually install the following JARs:

* `target/talon-one-client-6.0.0.jar`
* `target/talon-one-client-6.0.1.jar`
* `target/lib/*.jar`

## Getting Started
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apply plugin: 'eclipse'
apply plugin: 'java'

group = 'one.talon'
version = '6.0.0'
version = '6.0.1'

buildscript {
repositories {
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ lazy val root = (project in file(".")).
settings(
organization := "one.talon",
name := "talon-one-client",
version := "6.0.0",
version := "6.0.1",
scalaVersion := "2.11.4",
scalacOptions ++= Seq("-feature"),
javacOptions in compile ++= Seq("-Xlint:deprecation"),
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<artifactId>talon-one-client</artifactId>
<packaging>jar</packaging>
<name>talon-one-client</name>
<version>6.0.0</version>
<version>6.0.1</version>
<url>https://github.com/talon-one/maven-artefacts</url>
<description>Talon.One unified JAVA SDK. It allows for programmatic access to the integration and management API with their respective authentication strategies</description>
<scm>
Expand Down
8 changes: 6 additions & 2 deletions src/main/java/one/talon/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ public ApiClient(String authenticationStrategy) {
if (authenticationStrategy.equals("integration_auth")) {
authentications.put("integration_auth", new ApiKeyAuth("header", "Content-Signature"));
}

if (authenticationStrategy.equals("management_key")) {
authentications.put("management_key", new ApiKeyAuth("header", "Authorization"));
}
}

/*
Expand Down Expand Up @@ -128,7 +132,7 @@ private void init() {
json = new JSON();

// Set default User-Agent.
setUserAgent("OpenAPI-Generator/6.0.0/java");
setUserAgent("OpenAPI-Generator/6.0.1/java");

authentications = new HashMap<String, Authentication>();
}
Expand Down Expand Up @@ -1432,4 +1436,4 @@ private KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityExcepti
throw new AssertionError(e);
}
}
}
}

0 comments on commit 2b5723e

Please sign in to comment.