Skip to content

CachingJwtAuthenticator with expired token #29

Description

@stepos01

Hi, and thank you for this library. It helped me quite a bit.
I have a small issue while using the CachingJwtAuthenticator that could be due to my bad understanding.

  • the access token and the underlying guava cache both have a 1 hour TTL
  • if the first call to the CachingJwtAuthenticator is done 50 min after the token creation the token results valid and will be store in the cache and following calls will all results valid for an hour even if the token is then expired.
    Shouldn't the method "authenticate" on the "Authenticator<..,..>" be split in
    -one method to check the validity (which would then be call all the time)
    -one method to retrieve the user (if not found in the cache)
    thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions