8000 Include auth_time in SpecDates · Issue #825 · jwtk/jjwt · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Include auth_time in SpecDates #825
Open
@laurids

Description

@laurids

Is your feature request related to a problem? Please describe.
"auth_time" is not part of the default fields in Claims. When we need to read it, we cannot use claims.get("auth_time", Date.class) because the parameter is in seconds and java.util.Date requires milliseconds.

Describe the solution you'd like
Ideally all the Authentication Information Claims (auth_time, acr, amr) added as getters in Claims, or just auth_time added in DefaultClaims.isSpecDate, to be able to do e.g. claims.get("auth_time", Date.class).

Describe alternatives you've considered
Instead of reading it as a Date directly, we need to do something like:
var authTimeSeconds = claims.get("auth_time", Long.class);
var authTime = authTimeSeconds == null ? null : new Date(authTimeSeconds * 1000);

Additional context
See https://datatracker.ietf.org/doc/html/rfc9068#section-2.2.1

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0