Following roughly Scott's guide, I got it to work with authorization code flow. However, When I investigate the well-known, I see that junky_scope is listed as supported. My client and API scope/resource are declared as follows. The claims in the access token are to be based on the API scopes according to IDS4's GitHub.
public static IEnumerable<ApiScope> Obtain()
{
yield return new ApiScope("junky_scope", "Junky Scope"); ...
}
yield return new ApiResource
{
Name = "blopp", ...
Scopes = new List<string> { "awesome_scope", "junky_scope", ... }
};
yield return new Client
{
ClientId = "spa_client",
AllowOfflineAccess = true,
AllowedGrantTypes = GrantTypes.Code, ...
AllowedScopes = new List<string> { "openid", "awesome_scope", "junky_scope" }
};
Invoking the call to exchange my code for token, produces a valid access token but only containing openid and offline_access scopes, though. The same when requesting a new one using the refresh token. The payload passed in the body is shown below. I've tried with no scope specified to get all of the supported tokens (as promised in the docs) with no success.
client_id=spa_client
&scope=junky_scope
&redirect_uri=http://localhost:44304/beep
&code=205D...EDBF
&grant_type=authorization_code
The setup is very similar to the one in this question as well as this one, although they regard different matters. The scopes declared are shown as included in the response, though.
I thought at first it may have to do with the definition of my test users but there's nothing about claims there and the closest I can see is claims. But I don't rely on claims in my scope, so that's a dead-end.
I'm lost and not sure how to troubleshoot it further. Googling variations of ids4 access token scope no included produced very little.