Skip to content

Commit

Permalink
Merge pull request #14 from highmobility/fix-jwt
Browse files Browse the repository at this point in the history
Fix jwt
  • Loading branch information
tonisives authored Mar 1, 2023
2 parents 52e46f9 + 50691e7 commit 60debe6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## [0.6.5]
- fix JWT Authorization error in sandbox

## [0.6.5]
- Compile for Java 8

Expand Down
2 changes: 0 additions & 2 deletions hmkit-fleet/src/main/kotlin/HMKitFleet.kt
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,6 @@ object HMKitFleet {
*/
@JvmField
var webUrl: String? = null
internal val jwtUrl: String?
get() = webUrl
}
}

Expand Down
2 changes: 1 addition & 1 deletion hmkit-fleet/src/main/kotlin/network/AuthTokenRequests.kt
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ internal class AuthTokenRequests(
put("ver", configuration.version)
put("iss", configuration.serviceAccountApiKey)
// OAuth is always in prod
put("aud", HMKitFleet.Environment.jwtUrl)
put("aud", HMKitFleet.environment.url)
put("jti", configuration.createJti())
put("iat", configuration.createIat())
}.toString()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ internal class AuthTokenRequestsTest : BaseTest() {
val jwtBody = buildJsonObject {
put("ver", configuration.version)
put("iss", configuration.serviceAccountApiKey)
put("aud", HMKitFleet.Environment.jwtUrl)
put("aud", HMKitFleet.environment.url)
put("jti", configuration.createJti())
put("iat", configuration.createIat())
}.toString()
Expand Down

0 comments on commit 60debe6

Please sign in to comment.