Code Monkey home page Code Monkey logo

Comments (6)

orangeagain avatar orangeagain commented on June 3, 2024

My current resolvent is decryption whole JWT.so i closet this issues

from jwt.

ycrumeyrolle avatar ycrumeyrolle commented on June 3, 2024

@orangeagain Can your share your solution?
Is it an issue with documentation?

from jwt.

orangeagain avatar orangeagain commented on June 3, 2024

@orangeagain Can your share your solution?
Is it an issue with documentation?

I Plan to encrypt whole token like this:
RAW:
{"alg": "HS256","typ": "JWT"}.{ "sub": "1234567890", "name": "John Doe", "iat": 1516239022}

after encrypt:
{"alg": "HS256","typ": "JWT"}.ENCRYPTPAYLOAD

final,after signature:
{"alg": "HS256","typ": "JWT"}.ENCRYPTPAYLOAD.SIGNATURE

I find different implement in your code.
but you didn't throw decryption payload,you just valid it.
can you throw payload json in decryption process?

JWT struct:
header.PAYLOAD.signature

from jwt.

orangeagain avatar orangeagain commented on June 3, 2024

Throw payload json because I need read custom jsonobj
custom json
don't need to deserlized,just throw string or byte[]. and we can deserlized it use other library like utf8json.

from jwt.

orangeagain avatar orangeagain commented on June 3, 2024

I found a way.thank you
https://github.com/ycrumeyrolle/Jwt/blob/master/samples/BinaryJwtCreationSample/Program.cs
https://github.com/ycrumeyrolle/Jwt/blob/master/samples/JweValidationSample/Program.cs

from jwt.

ycrumeyrolle avatar ycrumeyrolle commented on June 3, 2024

You are right. If you need to encrypt a JWS, this is basicaly a JWE.

from jwt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.