Giter Site home page Giter Site logo

Comments (6)

jech avatar jech commented on June 2, 2024

Are you sure that you're not double-encoding the token? As in doing URL-encoding of the token twice?

Also, could you please provide the token?

from galene.

printpagestopdf avatar printpagestopdf commented on June 2, 2024

Sorry, forgot the token:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJycnVzZXIiLCJhdWQiOiJodHRwczpcL1wvZ2FsZW5lLnNlcnZlci50c3Q6ODAwOFwvZ3JvdXBcL2V4dFwvIiwicGVybWlzc2lvbnMiOlsicHJlc2VudCJdLCJpYXQiOjE2NzEyMjUxMTcsImV4cCI6MTY3MTIyODcxNywiaXNzIjoiaHR0cHM6XC9cL2F1dGguZXhhbXBsZS5vcmcifQ.mIp1tTkp2DF0UKTh8dztV6JbSpfn7ev22v9YFFKj1f0

I used this as it is here as url arg ?token=

For generating the token I was using a PHP library ReallySimpleJWT, but tried it although with the python jwt

from galene.

jech avatar jech commented on June 2, 2024

MYz3IfCq4Yq-UmPdNqWEOdPl4C_m9imHHs9uve#DUJGQ

The # sign is not allowed in Base64. I think you made a mistake when you copied the key.

from galene.

printpagestopdf avatar printpagestopdf commented on June 2, 2024

Thank you for the fast answer!

It's funny, I followed this rule: https://github.com/RobDWaller/ReallySimpleJWT#secret-strength
(so yes, I changed the key from your example slightly) not sure if the security consideration that is mentione is correct?

But https://dinochiesa.github.io/jwt/ validates it as correct.

Or am I absolutely wrong? Is the "k": .... the secret in base64 ???

from galene.

jech avatar jech commented on June 2, 2024

Is the "k": .... the secret in base64 ???

Yes. See RFC 7518 Section 6.4.1:

The "k" (key value) parameter contains the value of the symmetric (or
other single-valued) key. It is represented as the base64url
encoding of the octet sequence containing the key value.

User-provided passphrases tend to be weak. For shared tokens between servers, it is better to generate the secrets using a strong random number generator. The jose utility can be used to do that:

jose jwk gen -i '{"alg": "HS256"}'

If you think it's useful, I can write a utility to generate suitable keys and include it with Galene.

from galene.

printpagestopdf avatar printpagestopdf commented on June 2, 2024

Great, that was my fault and solves my Problem!

(I am able to read, but I probably reading the wrong things =) )

from galene.

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.