Comments (5)
hi @andreijw,
here's the code:
jwt/src/Directory.Build.targets
Lines 5 to 9 in 9b9484f
What means that MODERN_DOTNET
is enabled on the following platforms:
- net462
- netstandard2.0
- net6.0
And here's the list of all platforms the library supports:
Line 4 in 9b9484f
from jwt.
If your project targets net8.0
and references JWT, it'll automatically references the net6.0
version which includes all the latestr features.
from jwt.
See also the discussion for .NET 7.0: #451
from jwt.
Thanks a lot @abatishchev, this was very helpful.
My next question now, is using the dotnet 8.0 AOT features I have come into a lot of serialization issues. I found a way around it, but it requires adding a Parameterless constructor annotated as a JsonConstructor using System.Text.Json
An example would be in the JWT/Builder/JwtHeader.cs :
#if MODERN_DOTNET
[System.Text.Json.Serialization.JsonConstructor]
#endif
public JwtHeader() { }
I propose making a PR to add this in order to accommodate anyone using AOT.
from jwt.
Sure thing, a contribution is very welcome!
Can you please close this issue (as it was mostly about .NET 8), open a new one (for the AOT/serialization issues), and then submit a PR which would reference/resolve the new issue.
from jwt.
Related Issues (20)
- Discussion - what the relation to 'System.IdentityModel.Tokens.Jwt' HOT 2
- Decode<JwtHeader> not working HOT 25
- "Illegal base64url string" when try to decode token HOT 20
- Not properly serilized object in fluent version of Decode HOT 9
- Support Asynchronous Signing in IJwtAlgorithm interface HOT 5
- Why has the HMAC SHA algorithm become obsolete? HOT 2
- InvalidOperationException occurs in Decode() after DecodeHeader(). HOT 2
- Support JWT authentication with public key using ES256 algorithm on .NET Compact Framework 3.5 HOT 2
- Decode does not break on wrong signature HOT 5
- Dotnet 8.0 AOT Issues
- Where is `RS256Algorirhm`? HOT 1
- Expiry Time is added to claims when decoding HOT 3
- Having trouble with first example Encode() HOT 2
- Expired token not throwing TokenExpiredException HOT 7
- Null reference error when trying to Decode HOT 2
- How to use IJwtValidator.Validate / TryValidate? HOT 5
- jwt is missing NuGet package README file HOT 2
- X21 HOT 1
- X21 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jwt.