As per http://docs.identityserver.io/en/release/reference/grant_validation_result.html I'm trying to add extra claims to a GrantValidationResult but the extra claims arent showing up just wondering where i could be going wrong here:
var extraClaims = new List<Claim> {
new Claim("resource_id", resourceId)
};
context.Result = new GrantValidationResult(
subject: bobIdentity,
authenticationMethod: "custom",
claims: extraClaims);
return;
If you haven't setup your own custom Extension Grant check out this information:
You need to create custom IExtensionGrantValidator implementation to add extra claims.
Simple example is also located at that link.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.