busy-pizza-65563
10/20/2022, 1:52 PMmagnificent-energy-493
magnificent-energy-493
busy-pizza-65563
10/20/2022, 2:08 PMworried-kitchen-94392
10/20/2022, 2:08 PMbusy-pizza-65563
10/20/2022, 2:08 PMbusy-pizza-65563
10/20/2022, 2:09 PMhigh-optician-2097
busy-pizza-65563
10/20/2022, 2:19 PMcurl <https://stoic-darwin-l9lmzvz6dk.projects.oryapis.com/admin/identities/7900ceb3-25fa-463e-bd3b-c57963093ae7> \
-H "Accept: application/json" \
-H "Authorization: Bearer {PAT}"
busy-pizza-65563
10/20/2022, 2:20 PM{
"error": {
"code": 401,
"status": "Unauthorized",
"request": "9bf3ea85-c7e9-9e60-9a29-60ba53056b8b",
"message": "Access credentials are invalid"
}
}
busy-pizza-65563
10/20/2022, 2:24 PMbusy-pizza-65563
10/20/2022, 2:24 PMworried-kitchen-94392
10/20/2022, 2:29 PMbusy-pizza-65563
10/20/2022, 2:32 PM__cflb
cookie, and the request went through successfully.worried-kitchen-94392
10/20/2022, 2:34 PMred-sugar-49451
10/20/2022, 2:39 PM__cflb
should not change the behavior, as the request will end up on the same backend anyway.busy-pizza-65563
10/20/2022, 2:44 PM__cflb
cookie
• make the same request again (it should send the cookie too) – it ends up with 401 error
• remove the cookie
• repeat request – it is successfulhigh-optician-2097
high-optician-2097
curl -X GET -H "Authorization: Bearer $PAT" -H "Cookie: __cflb=0pg1NzeikcL87UC55K2NZzNkiMfk1RPhaFFVXo31" <https://wonderful-babbage-e60xslmh16.projects.oryapis.com/admin/identities>
high-optician-2097
busy-pizza-65563
10/20/2022, 3:22 PM<a href="<https://auth.dev.headframe.io/admin/identities/e036f842-364d-4266-be0d-cabf8f9d95d8>">Temporary Redirect</a>.
high-optician-2097
busy-pizza-65563
10/20/2022, 3:29 PMbusy-pizza-65563
10/20/2022, 3:36 PMhigh-optician-2097
Authorization
header apparently is not included on the redirected request, which ends up with a 401.
If you do
curl -L <https://auth.dev.headframe.io/admin/identities/e036f842-364d-4266-be0d-cabf8f9d95d8> \
-H "Accept: application/json" \
-H "Authorization: Bearer ..." \
-H "Cookie: __cflb=0pg1S3Ro4fXTRGA6anYK6AkQyWTgApNdpS9TdLLb"
it does work as expected.
I also didn’t know that 307 won’t include the Authorization
header again. We will see if there is something that we can do to fix thishigh-optician-2097
high-optician-2097
busy-pizza-65563
10/20/2022, 8:06 PMbusy-pizza-65563
10/20/2022, 8:06 PM