Edoardo Maria Liotta
12/22/2022, 3:33 PMwww-authenticate: Bearer scope="" error="invalid_token" error_description="token contains an invalid number of segments"
but according to the Auth parser, this header is malformed (see stacktrace below). In the end, this causes refresh tokens never to be requested. Can you confirm whether this issue is on the parser or on AWS? Thank you in advance
Ktor and Auth plugin ver: 2.2.1
io.ktor.http.parsing.ParseException: Expected delimiter , at position 16, but found e
at io.ktor.http.auth.HttpAuthHeaderKt.skipDelimiter(HttpAuthHeader.kt:441)
at io.ktor.http.auth.HttpAuthHeaderKt.matchParameters(HttpAuthHeader.kt:141)
at io.ktor.http.auth.HttpAuthHeaderKt.parseAuthorizationHeader(HttpAuthHeader.kt:106)
at io.ktor.http.auth.HttpAuthHeaderKt.parseAuthorizationHeaders(HttpAuthHeader.kt:69)
at io.ktor.client.plugins.auth.Auth$Plugin$install$2.invokeSuspend(Auth.kt:58)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.internal.DispatchedContinuation.resumeWith(DispatchedContinuation.kt:205)
at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:135)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:109)
at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:11)
at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:59)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7872)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
Aleksei Tirman [JB]
12/22/2022, 4:18 PMEdoardo Maria Liotta
12/23/2022, 8:25 AMEdoardo Maria Liotta
12/23/2022, 8:39 AMAleksei Tirman [JB]
12/23/2022, 8:51 AMWWW-authenticate
header for the Bearer
scheme but the last example in the section from the specification contains attributes separated by comma.Aleksei Tirman [JB]
12/23/2022, 8:54 AMdifferent challenges should go to different header declarationsAs I see, you have only one challenge
Edoardo Maria Liotta
12/23/2022, 10:32 AM