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
937 stars 184 forks source link

.NET Core #13

Closed matthiasjost closed 7 years ago

matthiasjost commented 9 years ago

Are there plans to support .NET Core. I know there are still in the beta phase, but for my project this would be a criteria, because we want to use .NET Core once all our dependencies are compatible with it.

dvsekhvalnov commented 8 years ago

Ok, guys, help me understand (all news are so controversial): RC2 is basically deprecating dnx and dnxcore in favor of new platform ids? So no need to support it in library anymore?

Also did i get it right that DNVM tool is also retired and RC2 should be installed separately (not an upgrade)?

matthiasjost commented 8 years ago

"For RC2 we will move ASP.NET Core 1.0 to be based on the new cross-platform .NET Core command line toolchain."

If you look here: https://github.com/aspnet/dnx (DNX Repository)

They clearly say "retired".

replace DNX, DNU – these tools just go away some portions of source code have been copied like DNX and DNU – tools designed to be used by humans [...] version handling DNVM like tool? DNVM still under considerations. Main question is how tool like DNVM will find it’s place to switch between toolchains.

Source: http://bleedingnedge.com/2016/02/04/new-toolchain-dotnet-cli/

So Situation seemed not yet clear at the moment they wrote this article. I have no information that is more recent. Maybe you would find it in the Community Standup Meetings on Youtube.

adimkov commented 8 years ago

@dvsekhvalnov I pushed sample to GitHub repository https://github.com/inteno/DotNetRC2-Jose-JWT-Demo/ You can try it.

dvsekhvalnov commented 8 years ago

Thanks @adimkov , what Visual Studio this project is? Can't open with mine VS2015 Community.

I think i've installed RC2 for now, trying to get any idea what VS version supports tooling (if any) and how to target new NETCore RC2

adimkov commented 8 years ago

@dvsekhvalnov, Now there are some problems with this. Visual Studio at the moment (to my knowledge) does not support the RC2. To work with this type of project, you must use the VS Code Insider Preview. The project, which I pushed in the repository, was created using VS Code.

matthiasjost commented 8 years ago

The "Visual Studio tooling" for new "dotnet" CLI is planned to be available in mid June. Meanwhile you can use command line (dotnet SDK) or Visual Studio Code (which also uses this SDK).

dvsekhvalnov commented 8 years ago

wow, so inconsistent. Ok, trying VS Code.

matthiasjost commented 8 years ago

Hehe yes. Visual Studio Code is not even similar to Visual Studio (only by the name).

senwen commented 8 years ago

@dvsekhvalnov , tooling for Visual Studio and RC2 Preview has been released - https://www.microsoft.com/net/core#windows

I got my local fork working in Visual Studio now. Previously I had to use DNU/DNIX (rc1) and DOTNET (rc2) command line.

dvsekhvalnov commented 8 years ago

@senwen thanks, i'll try to update my VS once again

dvsekhvalnov commented 8 years ago

@adimkov , @MatthiasJost it looks i updated for netcoreapp1.0 target. At least was able to run simple console app with it.

I've uploaded .nupkg here: https://github.com/dvsekhvalnov/jose-jwt/blob/master/jose-jwt.2.0.0.nupkg

Or if you clone v2-netcore branch, you should be able to build it with dotnet cli:

  1. cd jose-jwt
  2. dotnet restore
  3. dotnet pack -c Release

Looking how to add unit tests for netcoreapp target.

As usual i'll appreciate feedback (working/not working/etc)

senwen commented 8 years ago

@dvsekhvalnov , I've been using these two packages for unit tests on dotnet core. "xunit": "2.1.0-", "dotnet-test-xunit": "1.0.0-rc2-"

You'll need https://www.myget.org/F/coreclr-xunit/api/v3/index.json feed for dotnet-test-xunit.

Also moq port for dotnet core is useful: "moq.netcore": "4.4.0-beta8"

leastprivilege commented 8 years ago

https://xunit.github.io/docs/getting-started-dotnet-core.html

kukjevov commented 8 years ago

Hi i`ve tested on .net core version 2.0.0 of your library and it works exactly as i need it :), just great.

Thank you very much :)

dvsekhvalnov commented 8 years ago

Ok, anybody else? Another +1 for .netcoreapp1.0 ?

murilocurti commented 8 years ago

+1 ! Can you publish it on nuget.org as a pre-release?

a3nick commented 8 years ago

+1!

dvsekhvalnov commented 8 years ago

Ok, working on this guys. Thanks.

escamoteur commented 8 years ago

Would be really great!

dvsekhvalnov commented 8 years ago

On it. Preparing for initial nuget release.

aidapsibr commented 8 years ago

Any news on this @dvsekhvalnov ? I'm pumped to use the codebase, going to port a SaaS solution to core, this is the next to last library I need! Thanks for your hardwork!

dvsekhvalnov commented 8 years ago

Hey, yeah actually v2-netcore branch in good shape (still not all algos, but anyway), restored .net4 compatibility and unit tests.

The one thing that's i'm not sure if library should target netcoreapp1.0 or netstandard1.3. Currently netcoreapp1.0, but it looks it is more for apps than libraries. Documentation is so unclear (

So, my plan is to play little bit around netstandard targeting and finally push it out to nuget.org

aidapsibr commented 8 years ago

It is definitely the netstandard1.3 for libs.

sandersaares commented 8 years ago

Yes, netstandard is the way to go. The .NET Core Slack channel tends to be very helpful in figuring out this sort of thing - I can recommend it as a useful resource for getting to know the new .NET universe.

dvsekhvalnov commented 8 years ago

Ok, .netstandard1.4 will it be. Sorry 1.3 missing ECDSA classes (

Anybody is still interested in dnx451 or dnxcore50 targeting? Want to remove them completely.

matthiasjost commented 8 years ago

We are still interested in .NET Core. But I do not know what this means in terms of target names.

kukjevov commented 8 years ago

Well you can safely remove dnx451 and dnxcore50, if somebody still uses .NET RC1 he will upgrade soon, but i doubt that there is somebody who did not upgraded. And for users using RC2 or RTM those targets has no meaning. I think you can remove them.

aidapsibr commented 8 years ago

1.3 is hard to target, no worries @dvsekhvalnov.

ghost commented 8 years ago

Hi, is there any time line on .net core support?

dvsekhvalnov commented 8 years ago

hi @brightertools , most likely will push to nuget first version next week. Almost there.

brightertools commented 8 years ago

That will be great...

I have recently looked at Auth0, which mentioned your library, After you update, do you know if I will I be able to generate RS256 tokens to connect to their ManagementApi?

Thanks, for the update.

dvsekhvalnov commented 8 years ago

RS256 - definitely.

Some key management algos for encryption are not yet supported or missing in framework.

On Sunday, July 31, 2016, Mark Redman notifications@github.com wrote:

That will be great...

I have recently looked at Auth0, which mentioned your library, After you update, do you know if I will I be able to generate RS256 tokens to connect to their ManagementApi?

Thanks, for the update.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dvsekhvalnov/jose-jwt/issues/13#issuecomment-236421861, or mute the thread https://github.com/notifications/unsubscribe-auth/ACN2Euro2NNhrkuX0hr0ldbqfFbfJqtUks5qbHTOgaJpZM4GCT5S .

dvsekhvalnov commented 8 years ago

Ok, merged stuff to master. Coming close.

dvsekhvalnov commented 8 years ago

Hey guys, i finally pushed package to nuget.org (v2.0.1): https://www.nuget.org/packages/jose-jwt/

But it looks dotnet restore doesn't want to fetch the package. Though VS can perfectly do it and after it available to local .nuget cache.

Can somebody verify? (or better shed some light on what i did wrong with publishing)

aidapsibr commented 8 years ago

May just take a minute to update the remote stores.

aidapsibr commented 8 years ago

Probably need to determine actual dependencies too.

image

dvsekhvalnov commented 8 years ago

@psibernetic , didn't get it. What's wrong with NETStandard.LIbrary 1.6 ?

aidapsibr commented 8 years ago

It is recommended when publishing to determine which pieces of NETStandard.Library your library actually uses (derived from project.lock.json) and reference those specifically. Matching the Pay To Play model.

dvsekhvalnov commented 8 years ago

Is it the reason, why dotnet restore can stop working?

aidapsibr commented 8 years ago

Sorry, no, that wasn't clear!

dvsekhvalnov commented 8 years ago

Ok, so can somebody try to install package via dotnet restore and tell if it is working or failing?

aidapsibr commented 8 years ago

It works for me v2.0.1

image

dvsekhvalnov commented 8 years ago

Is it Visual Studio?

It's working for me in VS as well. But was not working if i did just dotnet restore from command line. May be i need to get clean VM..

aidapsibr commented 8 years ago

That was in VS CODE dotnet restore.

dvsekhvalnov commented 8 years ago

Ok. I actually got it working with OSX version.

But waiting for couple more people to confirm it is working :)

senwen commented 8 years ago

@dvsekhvalnov , we restored 2.0.1 successfully on Windows, Mac and Ubuntu inside Docker container and passed our CI-CD unit and integration tests. Thanks!

daMupfel commented 8 years ago

Working for me on OSX as well. Tested directly from command line.

dvsekhvalnov commented 8 years ago

Cool, thanks all.

Ok, i'll keep this issue open while working on adding more algos for netcore version.

If anybody experience troubles let me know.

brightertools commented 8 years ago

Thanks for the update @dvsekhvalnov, this is working for me in VS.

kukjevov commented 8 years ago

Thanks, working great in VS and with dotnet restore :).