Skip to content

Commit

Permalink
Additional headers with informations
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkGL committed Mar 31, 2023
1 parent bed7cf8 commit be735f7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
}

group 'pl.simpay.api'
version '2.1'
version '2.1.1'

repositories {
mavenCentral()
Expand Down
4 changes: 4 additions & 0 deletions src/main/kotlin/pl/simpay/api/service/AuthInterceptor.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import okhttp3.Response

private const val SIM_KEY_HEADER = "X-SIM-KEY"
private const val SIM_PASSWORD_HEADER = "X-SIM-PASSWORD"
private const val SIM_VERSION_HEADER = "X-SIM-VERSION"
private const val SIM_PLATFORM_HEADER = "X-SIM-PLATFORM"

class AuthInterceptor(private val apiKey: String, private val simPassword: String) : Interceptor {

Expand All @@ -13,6 +15,8 @@ class AuthInterceptor(private val apiKey: String, private val simPassword: Strin
.newBuilder()
.header(SIM_KEY_HEADER, apiKey)
.header(SIM_PASSWORD_HEADER, simPassword)
.header(SIM_VERSION_HEADER, "2.1.1")
.header(SIM_PLATFORM_HEADER, "KOTLIN")
.build()
return chain.proceed(request)
}
Expand Down

0 comments on commit be735f7

Please sign in to comment.