Closed zngreg closed 7 years ago
I really can't tell (despite all the code/config you dumped), but this "invalid protocol type" makes me think that postman is sending json, but the token endpoint requires form-url-encoded. Perhaps that's your issue?
I am using x-www-from-urlencoded
Well - ProtocolType is null. It needs to be set to ProtocolTypes.OpenIdConnect
(which is the default value on the Client
class). I guess a problem with the DB mapping.
Thank you so much, this helped.
Did this happen with our EF implementation - or your own persistence layer?
It is my persistence layer, I implemented it since version 1.0.0-beta2. If there is a database/ EF implementation on client, scopes, resources, etc that is already available on IdentityServer4 I will be very interested in learning about it. Thank you
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
I have an issue where I'm trying to configure a client to use resource owner password and I'm using post (PostMan) to test the flow and I'm getting the error "Client "ClientId" has invalid protocol type for token endpoint: null" on caling /connect/token endpoint. I moved clients, Resources, users into database.
I have ICientStore as below :
public class ClientStore : IClientStore { private static SecurityContext _context;
I implemented ResourceOwnerPasswordValidator as below :
using System.Linq; using System.Security.Claims; using System.Threading.Tasks; using IdentityServer4.Validation; using Ilambu.Security.Entities; using Microsoft.AspNetCore.Identity;
namespace Ilambu.Security.IdentityServer { public class ResourceOwnerPasswordValidator : IResourceOwnerPasswordValidator { readonly UserManager _userManager;
}
However, it's doesn't even come here.
Below is my startup.cs:
public class Startup { public Startup(IHostingEnvironment env) { var builder = new ConfigurationBuilder() .SetBasePath(env.ContentRootPath) .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true) .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true) .AddEnvironmentVariables(); Configuration = builder.Build();
Relevant parts of the log file