ResourceOwnerPassword with ReferenceToken assumes secret type of NoSecret
Im trying to use referencetoken with a client of GrantType ResourceOwner. But as soon as i set AccessTokenType = AccessTokenType.Reference, I cannot use my API. The error I get is the following
fail: IdentityServer4.Validation.HashedSharedSecretValidator[0]
Parsed secret should not be of type NoSecret
fail: IdentityServer4.Validation.SecretValidator[0]
Secret validators could not validate secret
fail: IdentityServer4.Validation.ScopeSecretValidator[0]
Scope validation failed.
fail: IdentityServer4.Endpoints.IntrospectionEndpoint[0]
Scope unauthorized to call introspection endpoint. aborting.
This is how my Client looks
public static IEnumerable<Client> GetClients()
{
return new List<Client>
{
new Client
{
ClientId = "ro.client",
ClientName = "ro client",
AllowedGrantTypes = GrantTypes.ResourceOwnerPassword,
AccessTokenType = AccessTokenType.Reference,
ClientSecrets = new List<Secret>
{
new Secret("secret".Sha256())
},
AllowedScopes = new List<string>
{
"api1"
}
}
};
}
Otherwise its pretty much the same as your examples. Ive tried using
SupportedTokens = IdentityServer4.AccessTokenValidation.SupportedTokens.Reference,
on my api configuration but it doesnt change anything.
The Identification and Api works fine as long as I dont use AccessTokenType.Reference on my client settings.
Apparently the problem was because I didnt use AddConfigurationStore.
Edit: False alarm. I still can't get it to work properly with Reference token :(
Have you set a scope secret for for your API?
You are the correct. I had Scope secret but wasnt cleaver enough to actually use it in my API.. Thanks
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.