dvsekhvalnov / jose-jwt

Ultimate Javascript Object Signing and Encryption (JOSE), JSON Web Token (JWT) and Json Web Keys (JWK) Implementation for .NET and .NET Core
MIT License
932 stars 184 forks source link

Support all .NET Standard platforms with a single codebase #37

Open sandersaares opened 8 years ago

sandersaares commented 8 years ago

It would be desirable to have a single jose-jwt codebase/package that works on all .NET Standard platforms. The idea being that if I make my own .NET Standard library that uses jose-jwt functionality, I can reference jose-jwt and it will "just work" on all .NET Standard platforms that my library itself targets.

For example, UWP support would be desirable. On installing the library into a brand new UWP project (just blank UWP app), I get the following error message:

Restoring packages for 'App8'.
Restoring packages for C:\Source\App8\App8\project.json...
System.Security.Cryptography.Csp 4.0.0 provides a compile-time reference assembly for System.Security.Cryptography.Csp on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-arm.
One or more packages are incompatible with UAP,Version=v10.0 (win10-arm).
System.Security.Cryptography.Csp 4.0.0 provides a compile-time reference assembly for System.Security.Cryptography.Csp on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-arm-aot.
System.Reflection.Emit.ILGeneration 4.0.1 provides a compile-time reference assembly for System.Reflection.Emit.ILGeneration on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-arm-aot.
One or more packages are incompatible with UAP,Version=v10.0 (win10-arm-aot).
System.Security.Cryptography.Csp 4.0.0 provides a compile-time reference assembly for System.Security.Cryptography.Csp on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x64.
One or more packages are incompatible with UAP,Version=v10.0 (win10-x64).
System.Security.Cryptography.Csp 4.0.0 provides a compile-time reference assembly for System.Security.Cryptography.Csp on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x64-aot.
System.Reflection.Emit.ILGeneration 4.0.1 provides a compile-time reference assembly for System.Reflection.Emit.ILGeneration on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x64-aot.
One or more packages are incompatible with UAP,Version=v10.0 (win10-x64-aot).
System.Security.Cryptography.Csp 4.0.0 provides a compile-time reference assembly for System.Security.Cryptography.Csp on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x86.
One or more packages are incompatible with UAP,Version=v10.0 (win10-x86).
System.Security.Cryptography.Csp 4.0.0 provides a compile-time reference assembly for System.Security.Cryptography.Csp on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x86-aot.
System.Reflection.Emit.ILGeneration 4.0.1 provides a compile-time reference assembly for System.Reflection.Emit.ILGeneration on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x86-aot.
One or more packages are incompatible with UAP,Version=v10.0 (win10-x86-aot).
Package restore failed for 'App8'.
Package restore failed. Rolling back package changes for 'App8'.
========== Finished ==========
Time Elapsed: 00:00:01.9820806
dvsekhvalnov commented 8 years ago

@sandersaares , https://github.com/dvsekhvalnov/jose-rt ?

sandersaares commented 8 years ago

Aha - I did not expect to find it in a completely separate package and codebase. Is it compatible, in general? I notice the API is actually different (JoseRT instead of Jose).

In that case, I will modify this issue to better reflect the ideal scenario: support all .NET Standard platforms with a single NuGet package and a single API. Not saying it is feasible but it would certainly be nice. The idea is that I can write my own .NET Standard library that uses jose-jwt and works on all .NET Standard platforms the same way. Right now, there being two JOSE libraries, that does not appear possible.

dvsekhvalnov commented 8 years ago

Give it a try, it is RT component for Win 8.1. API pretty much same with respect to what possible with portable interface.

Well, can be interesting to merge all codebases, but it's probably long term plans :)