Adil
04/05/2024, 1:58 PMHttpClient {
install(Auth) {
bearer {
sendWithoutRequest { request ->
request.url.host == "<https://test/login>"
}
refreshTokens {
get<AuthManager>().renewToken()
}
}
}
still the refreshToken block dosn't work i.e calls remain 401Aleksei Tirman [JB]
04/05/2024, 2:30 PMrefreshTokens
's block isn't called? Can you share the response from the server?Adil
04/05/2024, 2:35 PM{"data":{},"errors":[],"appId":5008,"message":"Unauthorized"}
Adil
04/05/2024, 2:39 PMHttpResponseValidator {
validateResponse { response ->
when (response.status.value) {
401 -> {
println("SHOULD REFRESHHH")
}
}
}
}
i can use it manually call my renewToken api call function (but there will be a problem since as the old tokens api will not be recalled i guess since they already return 401 status)Aleksei Tirman [JB]
04/05/2024, 4:42 PMWWW-Authenticate
header?