Skip to content

Add isExpired to TokenHolder #356

@pennstatephil

Description

@pennstatephil

Describe the problem you'd like to have solved

It would be great if we could determine if the token inside a TokenHolder was still valid, from a time perspective.

Describe the ideal solution

An isExpired() method for TokenHolder that would return true if the exp time has passed for the token, otherwise false.

Alternatives and current work-arounds

Decode the token manually and check the exp time like:
JWT.decode(managementToken.getAccessToken()).getExpiresAt().toInstant().isBefore(Instant.now())

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestA feature has been asked for or suggested by the community

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions