Giter Club home page Giter Club logo

Comments (4)

aaugustin avatar aaugustin commented on July 29, 2024

No, this isn't currently supported.


Adding this feature would require:

  • adding an optional parameter to create_token, parse_token, and other functions that call them;
  • inserting its content in the output of get_revocation_key.

This raises the question of serializing to bytes in a cryptographically secure way arbitrary Python objects. AFAIK __hash__ isn't cryptographically secure. Alternatively make the optional parameter a string or bytes only.


Generally speaking:

  • if an attacker gets hold of a token you're in a bad place so I'm not sure I want to encourage this pattern;
  • a GET request shouldn't have side effects; it should display a button that the recipient can click to approve the transaction, perhaps after checking some info.

So I'm not sure I want to move forwards with this.

from django-sesame.

morenoh149 avatar morenoh149 commented on July 29, 2024

I think part of this was inspired by jwt. jwt can store arbitrary pieces of information. e.g.

https://jwt.io/#debugger-io?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyLCJ3aG8gd3JvdGUgbW9ieSBkaWNrUCI6Ikhlcm1hbiBNZWx2aWxsZSJ9.y9ogUARlJ8XAxeLgrojkALSGowLLpGTYiUZCMYWMfzs

from django-sesame.

aaugustin avatar aaugustin commented on July 29, 2024

I see. I'm not sure I'm willing to develop as much attack surface as JWT ;-)

from django-sesame.

aaugustin avatar aaugustin commented on July 29, 2024

I think #60 will help you do what you want. Make one scope per transaction e.g. scope = f"transaction-{transaction}" and you should be good.

from django-sesame.

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.