I have this code below, i need to login but Jira documantation so bad that i cant figured out, how can i login to jira ? They say basic auth is depreced but all examples are like this. How can i login ?
string apiUrl = @"https://MYDOMAIN.atlassian.net/rest/api/3/issue/MYPROJECTNAME";
using (var httpClient = new HttpClient())
{
using (var request = new HttpRequestMessage(new HttpMethod("GET"), apiUrl))
{
var base64authorization = Convert.ToBase64String(Encoding.ASCII.GetBytes("MYEMAIL@gmail.com:1xzyNAGgksdfgP3155"));
request.Headers.TryAddWithoutValidation("Authorization", $"Basic {base64authorization}");
var response = await httpClient.SendAsync(request);
}
}