Giter Club home page Giter Club logo

Comments (5)

borgogelli avatar borgogelli commented on June 15, 2024 1

thank you @jimmyjames for the really comprehensive answer

from java-jwt.

jimmyjames avatar jimmyjames commented on June 15, 2024

Thanks @borgogelli for the details and reproduction steps, we'll look into it this week and release a fix if needed. Thanks!

from java-jwt.

jimmyjames avatar jimmyjames commented on June 15, 2024

@borgogelli the exception you are seeing is because the actual audience in the JWT does not match the expected audience in the validation (the actual JWT's audience is 0a002700000b, while you have configured the validation to expect 0A002700000B - just incorrect casing). So the exception occurs because the audience does not match. If you were to comment out the audience validation (just to test) you'd receive an TokenExpiredException as expected.

from java-jwt.

borgogelli avatar borgogelli commented on June 15, 2024

e in the JWT does not match the expected audience in the validation (the actual JWT's audience is 0a002700000b, while you have configured the validation t

Hi @jimmyjames thank you for the reply
The question is why does the same test pass with version 3.19.4 ?

from java-jwt.

jimmyjames avatar jimmyjames commented on June 15, 2024

@borgogelli - in v3 the exp claim is validated prior to the aud claim, resulting in the TokenExpiredException being thrown prior to validating the aud claim (which would throw an IncorrectClaimException if the exp claim were valid). Both cases result in an invalid JWT but different types of JWTVerificationException being thrown due to the order of validation.

from java-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.