I have a windows service (no user interaction) which makes calls protected services (say for example makes calls to REST / WEB API). I tried to use Client Credentials Flow, but looks like IdentityServer3 does not understand Client Credentials flow. The subject value (supposed to contain ClaimsPrincipal object) is null. Any idea what is the issue here? Does IdentityServer3 supports Client Credentials flow? What is the correct way of using Client Credentials flow with IdentityServer3?
The following is my client code, which eventually gets the response as Internal Server error from IdentityServer3:
var handler = new WebRequestHandler();
handler.UseDefaultCredentials = true;
var client = new TokenClient(
Constants.TokenEndpoint,
"client",
"secret", handler);
return client.RequestClientCredentialsAsync("read write").Result;