I am creating a desktop application where I want to retrieve some pages or information from Confluence and Jira and maybe other tools.
I'm using RestSharp to make the API Request, but my question is if I need to make some kind of authentication for the user if he is already logged in with his user and psw into SAP/Kerberos. I see some people use SSPI?
At the moment I can retrieve data from other rest api but not confluence or jira so I am thinking maybe authentication is the problem.
So what would be a good way to go about this? User logins into windows (same login credentials for windows, confluence, jira etc) and with the desktop app he can retrieve/manipulate information from confluence/jira with his account.
Thank you!
Edit1: Here is how I am trying to retrieve now a page:
public class GetApix
{
public static string getxxx(string url)
{
string info = null;
var credentials = System.Net.CredentialCache.DefaultNetworkCredentials;
var options = new RestClientOptions(url)
{
UseDefaultCredentials = false,
Credentials = credentials
};
var client = new RestClient(options);
var request = new RestRequest();
var response = client.Get(request);
info = response.Content.ToString();
return info;
}
}
Call the function:
public string xxx => GetApix.getxxx("https://confluence.xxx.yyy.cloud/api/MyPage");
I have tried different urls type (rest/api, api/) but still does not work.
In Postman I can get the response without auth just by using the url without any rest or api tags