but if I try to post my username and password via ServiceStack, I can never see the sso_authToken and admin_authToken cookies, only this one:
JSESSIONID=F7903BF; Path=/; Secure; HttpOnly
So, how can I get to see ALL the cookies that get sent so I can get access to the admin_authToken cookie via one of the SS clients?
when I was playing with HttpClient, I did see these cookies buried way down in the HttpClientHandler object. in cookiecontainer/m_domaintable in the .mediashuttle.com item
Please note ServiceStack Service Clients are only for consuming ServiceStack Services, you can use the opinionated HTTP Utils to consume 3rd Party APIs, where you can access response cookies in a response filter:
url.GetStringFromUrl(responseFilter: res.Cookies)
The Service Clients do implement GetCookieValues() where you can access Cookies in a string dictionary:
var cookies = client.GetCookieValues();
Or you can get direct access to the CookieContainer with:
does not result in any cookies being populated in httpRes either
i think i figured out how to do it via HttpClient in conjunction with an HttpClientHandler when setting allow redirect = false. have to use response.Headers.GetValues(“Set-Cookie”) and i get back an array of 3 strings.
this also works with
responseFilter: httpRes =>
{
Debug.WriteLine(httpRes.Cookies.Count);
}
using the same method, but why don’t the cookies actually populate? strange
if you take out the AllowRedirect = false it also fails to populate the cookies at all.