1
다음 코드는 Windows에서 VS를 사용하여 작성되었으며 Windows에서 잘 실행되는 것 같습니다. 이것에 대해 구글이나에 StackOverflow에서 많이 발견하지 않았습니다, 그리고 다른 많은 생각을하지 않은예외 IDX10632가 Monodevelop에서 JSON 웹 토큰을 작성하는 중
System.InvalidOperationException : IDX10632: SymmetricSecurityKey.GetKeyedHashAlgorithm('http://www.w3.org/2001/04/xmldsig-more#hmac-sha256') threw an exception.
SymmetricSecurityKey: 'System.IdentityModel.Tokens.InMemorySymmetricSecurityKey'
SignatureAlgorithm: 'http://www.w3.org/2001/04/xmldsig-more#hmac-sha256', check to make sure the SignatureAlgorithm is supported.
Exception: 'System.NotSupportedException: Specified method is not supported.
at System.IdentityModel.Tokens.InMemorySymmetricSecurityKey.GetKeyedHashAlgorithm (System.String algorithm) <0x40200b40 + 0x0008b> in <filename unknown>:0
at System.IdentityModel.Tokens.SymmetricSignatureProvider..ctor (System.IdentityModel.Tokens.SymmetricSecurityKey key, System.String algorithm) <0x40200350 + 0x000c7> in <filename unknown>:0 '.
----> System.NotSupportedException : Specified method is not supported.
: 우분투에서 MonoDevelop에서 테스트 할 때
List<Claim> claimsList;
InMemorySymmetricSecurityKey key;
// fill claims and key with data
var token = new JwtSecurityToken
(
claims: claimsList,
signingCredentials: new SigningCredentials(key, SecurityAlgorithms.HmacSha256Signature, SecurityAlgorithms.Sha256Digest)
);
var tokenHandler = new JwtSecurityTokenHandler();
string tokenStr = tokenHandler.WriteToken(token);
는 다음과 같은 메시지와 함께
tokenHandler.WriteToken(token)
실패 내가 시도 할 수있는. 설치해야하는 외부 리소스 나 패키지에 의존합니까? OpenSSL이 설치되었는지 확인했습니다.
This 그러나 나는 Katana 또는 OpenID를 사용하지 않고있는 것으로 보입니다.이 문제는 대칭 대칭성과 관련이 없습니다.
직접 패치를 적용하여 수정할 수 있습니다. 감사. –