Skip to content
Snippets Groups Projects
Commit 7cdbf7d4 authored by John's avatar John
Browse files

Merge branch 'patch-1' into 'master'

Drop the redundant private_token GET parameter

See merge request Commit451/LabCoat!40
parents 078cec7f 66e6ca61
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -12,7 +12,6 @@ class AuthenticationRequestInterceptor(private val account: Account) : Intercept
 
companion object {
const val PRIVATE_TOKEN_HEADER_FIELD = "Private-Token"
private const val PRIVATE_TOKEN_GET_PARAMETER = "private_token"
}
 
@Throws(IOException::class)
Loading
Loading
@@ -25,10 +24,6 @@ class AuthenticationRequestInterceptor(private val account: Account) : Intercept
if (isSameServer(url.toString(), serverUrl)) {
val privateToken = account.privateToken
privateToken?.let {
url = url.newBuilder()
.addQueryParameter(PRIVATE_TOKEN_GET_PARAMETER, it)
.build()
request = request.newBuilder()
.header(PRIVATE_TOKEN_HEADER_FIELD, it)
.url(url)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment