Posts

Using HTTP to get a token from IdentityServer 4.

Image
This is part 2, part 1 can be found here . IdentityServer's token endpoint expects to receive content as application/x-www-form-urlencoded. Note:  if you wish to view the request and response in fiddler use localhost.fiddler Create a console application select .Net Core as the type. Optionally add a class if you want to deserialize the data to an Object. public class RootObject { public String access_token { get; set; } public String expires_in { get; set; } public String token_type { get; set; } } Example 1 using WebClient Create a NameValueCollection var body = new NameValueCollection() { { "client_id", "client" }, {"client_secret", "secret" }, {"grant_type", "client_credentials" }, {"scope", "api

IdentityServer 4 Discovery & Token EndPoint

Image
This is part 1, part 2 can be found  here . IdentityServer 4 is certified a OIDC/Oauth server. Endpoints are available using the discovery client, here we try to demystify the discovery and how to get a token process. Clone this Git repo . Navigate to \IdentityServer4.Samples\Quickstarts\1_ClientCredentials Open the solution Quickstart1_ClientCredentials.sln Right click the IdentityServer project >Debug>Start new instance With IdentityServer Started visit  http://localhost:5000/.well-known/openid-configuration You should see this data {"issuer":"http://localhost:5000","jwks_uri":"http://localhost:5000/.well-known/openid-configuration/jwks","authorization_endpoint":"http://localhost:5000/connect/authorize","token_endpoint":"http://localhost:5000/connect/token","userinfo_endpoint":"http://localhost:5000/connect/userinfo","end_session_endpoint&