title: Authentication with IdentityServer, OpenId Connect
body: <p>I have to design a class library (dll) which will contain some methods. These methods, internally, will call some api endpoints and then return the corresponding response. The api calls require authorization with jwt bearer token.</p>
  <p>To authenticate a user with username and password, I have to call a specific uri, from an existing web application (live). From what I have seen in the requests which this web application makes, it uses OpenId Connect protocol, with Authorization Code Flow. So, I can observe in the network tab, that it makes a call to /authorize endpoint of Identity Provider, and then some other subsequent calls. On each of these calls, I cannot see the access token in the browser. Even the response of /authorize call, does not contain the &quot;code&quot; as described in the documentation.
  Now, what i have to do, is kind of like trying to mimick these kind of authentication steps in my dll library (.NET), by calling the endpoints using RestSharp (http client library). But, as far as I can see, I cannot obtain this access token in any case. I have tried to call /token endpoint of OpenId Connect internally from this dll (using RestSharp), but without success (first, because I do not receive &quot;code&quot; from previous /authorize endpoint, and second, because when i build the url for token endpoint like http://domain/oauth2/token, it returns status code NotFound);</p>
  <p>I have read from some articles and also the documentation, that the call to /token endpoint is done only on back-channel, so maybe this is a reason why i cannot successfully authenticate and get the access token (and id token).</p>
  <p>Is there any way to achieve this, and obtain the access token, so that later i can use it to authorize my requests ? Or is it not possible in my case ?</p>