Skip to content

Commit 2b5723e

Browse files
authored
Add management key auth support (#42)
1 parent 5c6444b commit 2b5723e

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Add this dependency to your project's POM:
5353
<dependency>
5454
<groupId>one.talon</groupId>
5555
<artifactId>talon-one-client</artifactId>
56-
<version>6.0.0</version>
56+
<version>6.0.1</version>
5757
<scope>compile</scope>
5858
</dependency>
5959
```
@@ -63,7 +63,7 @@ Add this dependency to your project's POM:
6363
Add this dependency to your project's build file:
6464

6565
```groovy
66-
compile "one.talon:talon-one-client:6.0.0"
66+
compile "one.talon:talon-one-client:6.0.1"
6767
```
6868

6969
### Others
@@ -76,7 +76,7 @@ mvn clean package
7676

7777
Then manually install the following JARs:
7878

79-
* `target/talon-one-client-6.0.0.jar`
79+
* `target/talon-one-client-6.0.1.jar`
8080
* `target/lib/*.jar`
8181

8282
## Getting Started

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apply plugin: 'eclipse'
33
apply plugin: 'java'
44

55
group = 'one.talon'
6-
version = '6.0.0'
6+
version = '6.0.1'
77

88
buildscript {
99
repositories {

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ lazy val root = (project in file(".")).
22
settings(
33
organization := "one.talon",
44
name := "talon-one-client",
5-
version := "6.0.0",
5+
version := "6.0.1",
66
scalaVersion := "2.11.4",
77
scalacOptions ++= Seq("-feature"),
88
javacOptions in compile ++= Seq("-Xlint:deprecation"),

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<artifactId>talon-one-client</artifactId>
66
<packaging>jar</packaging>
77
<name>talon-one-client</name>
8-
<version>6.0.0</version>
8+
<version>6.0.1</version>
99
<url>https://github.com/talon-one/maven-artefacts</url>
1010
<description>Talon.One unified JAVA SDK. It allows for programmatic access to the integration and management API with their respective authentication strategies</description>
1111
<scm>

src/main/java/one/talon/ApiClient.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ public ApiClient(String authenticationStrategy) {
101101
if (authenticationStrategy.equals("integration_auth")) {
102102
authentications.put("integration_auth", new ApiKeyAuth("header", "Content-Signature"));
103103
}
104+
105+
if (authenticationStrategy.equals("management_key")) {
106+
authentications.put("management_key", new ApiKeyAuth("header", "Authorization"));
107+
}
104108
}
105109

106110
/*
@@ -128,7 +132,7 @@ private void init() {
128132
json = new JSON();
129133

130134
// Set default User-Agent.
131-
setUserAgent("OpenAPI-Generator/6.0.0/java");
135+
setUserAgent("OpenAPI-Generator/6.0.1/java");
132136

133137
authentications = new HashMap<String, Authentication>();
134138
}
@@ -1432,4 +1436,4 @@ private KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityExcepti
14321436
throw new AssertionError(e);
14331437
}
14341438
}
1435-
}
1439+
}

0 commit comments

Comments
 (0)