Giter Site home page Giter Site logo

Comments (3)

sergiught avatar sergiught commented on May 18, 2024

Hey @josh-feldman 👋🏻

Thanks for raising this and apologies for the unexpected behavior change. The fact that the previous version allowed passing an empty audience slice and skipping the validation, was flawed and was considered a bug. Validation should always occur on the issuer, audience and time based claims.

from go-jwt-middleware.

josh-feldman avatar josh-feldman commented on May 18, 2024

@sergiught should we at least change the error to validate an empty audience array as invalid expectations or at least one audience must be specified? The current error for not passing in an audience array and getting back that the token is invalid regardless of whether the audience field exists or not is misleading.

from go-jwt-middleware.

sergiught avatar sergiught commented on May 18, 2024

Agreed @josh-feldman, the error message definitely needs to be improved and fire earlier when we set up the validator in case the audience is nil or len 0. I'll try to find some time to improve that soon. Thanks!

from go-jwt-middleware.

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.