I plugged Microsoft JwtSecurityTokenHandler into the security token handlers collection for use with the stock Microsoft SecurityTokenService. Everything goes smooth in System.IdentityModel.SecurityTokenService.Issue until the STS invokes CreateSecurityTokenReference on the JwtSecurityTokenHandler.
At this point the JwtSecurityTokenHandler throws
NotSupportedException / IDX11005: Creating a SecurityKeyIdentifierClause is not supported.
Can you not use JwtSecurityTokenHandler with the stock Microsoft SecurityTokenService?
System.IdentityModel.Tokens.Jwt.4.0.0-RC2