Cookie Based Authentication With HttpClient

Cookie based authentication against API isn’t common scenario but you would find it here and there, mostly in legacy applications. HttpClient supports cookies out of the box, but it doesn’t work always as expected. In my scenario the cookie is always invalided by API after each call which results always to the following behavior: the first request is successful, every other is rejected. Let see how can be avoid it.

Authenticate against Jira REST APIs with OAuth 1.0a 1-Legged and .NET Core 2.x

OAuth specification 2.0 is out there since 2012 but 1.0a version is still widely used. Atlassian’s Jira is for example such case. You wouldn’t find anything about 1-Legged OAuth in the documentation but the fact is, by now, Jira is still supporting this flow but referring to this wrongly as 2-Legged OAuth. Sadly there aren’t lot of .Net Core libraries which implements OAuth’s 1-Legged, as described in the The OAuth Bible. I implemented this functionality into oauth-dotnetcore library and will show you how this can be used to access Jira APIs.