JWT 토큰을 사용하여 무기 인증을 위해 auth0와 인터페이스하는 ASP.NET 5/Core RC1 MVC (WebApi) 애플리케이션이 있습니다. 응용 프로그램은 dnx451
을 프레임 워크로 사용합니다 (지원되지 않는 종속성 때문에 CoreCLR이 아님).JWT 인증과 관련된 AsymmetricSignatureProvider가있는 TypeLoadException
Windows에서 응용 프로그램을 실행할 때 완벽하게 작동합니다. 그러나 우분투에서 Mono를 런타임으로 사용하여 dnx451
을 실행하고 싶습니다. 앱이 실행되지만 요청을 받으면 Internal Server Error 500
과 함께 반환됩니다.
로그 출력 :
info: Microsoft.AspNet.Hosting.Internal.HostingEngine[3]
Request finished in 0.0006ms 500
fail: Microsoft.AspNet.Server.Kestrel[13]
An unhandled exception was thrown by the application.
System.IdentityModel.Tokens.SecurityTokenInvalidSignatureException: IDX10503: Signature validation failed. Keys tried: 'System.IdentityModel.Tokens.X509SecurityKey , KeyId: MTZBREFEQ0M5NUQ2RDY3RDkzM0E0RDYwMDdCM0I4QUY1MDc3RUNDNA
'.
Exceptions caught:
'System.TypeLoadException: Could not load type 'System.IdentityModel.Tokens.AsymmetricSignatureProvider' from assembly 'System.IdentityModel.Tokens, Version=5.0.0.112, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
at System.IdentityModel.Tokens.SignatureProviderFactory.CreateForVerifying (System.IdentityModel.Tokens.SecurityKey key, System.String algorithm) <0x4067def0 + 0x0001b> in <filename unknown>:0
at System.IdentityModel.Tokens.X509SecurityKey.GetSignatureProvider (System.String algorithm, Boolean verifyOnly) <0x4067de30 + 0x00057> in <filename unknown>:0
at System.IdentityModel.Tokens.SecurityKey.GetSignatureProviderForValidating (System.String algorithm) <0x4067de00 + 0x0001a> in <filename unknown>:0
at System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.ValidateSignature (System.Byte[] encodedBytes, System.Byte[] signature, System.IdentityModel.Tokens.SecurityKey key, System.String algorithm) <0x4067dcb0 + 0x0003f> in <filename unknown>:0
at System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.ValidateSignature (System.String token, System.IdentityModel.Tokens.TokenValidationParameters validationParameters) <0x40679070 + 0x004b3> in <filename unknown>:0
'.
token: '{"alg":"RS256","typ":"JWT","kid":"MTZBREFEQ0M5NUQ2RDY3RDkzM0E0RDYwMDdCM0I4QUY1MDc3RUNDNA"}.{"iss":"**********","sub":"*****************","aud":"****************","exp":1464737848,"iat":1464701848}'
at System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.ValidateSignature (System.String token, System.IdentityModel.Tokens.TokenValidationParameters validationParameters) <0x40679070 + 0x0096b> in <filename unknown>:0
at System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.ValidateToken (System.String token, System.IdentityModel.Tokens.TokenValidationParameters validationParameters, System.IdentityModel.Tokens.SecurityToken& validatedToken) <0x406782f0 + 0x0021d> in <filename unknown>:0
at Microsoft.AspNet.Authentication.JwtBearer.JwtBearerHandler+<HandleAuthenticateAsync>d__1.MoveNext() <0x41f5bcf0 + 0x011c4> in <filename unknown>:0
이 모노/ASP.NET 5 일반적인 호환성인가 또는 그것에 대해 할 수 있나요?
어떤 버전의 우분투 및 어떤 버전의 모노를 사용하고 있습니까? – user1623521
'Mono JIT 컴파일러 버전 4.2.3 (안정판 4.2.3.4/832de4b)'및'Ubuntu 14.04.4 LTS' – valorl
그런 오래된 배포판에 어떻게 그런 모던 모노를 설치 했습니까? – user1623521