Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use int64 type for claims with timestamps #600

Merged
merged 2 commits into from
May 28, 2021

Conversation

nestorvw
Copy link
Contributor

@nestorvw nestorvw commented May 24, 2021

Proposed changes

Uses int64 for timestamped claim values.

Checklist

  • I have read the contributing guidelines
    and signed the CLA.
  • I have read the security policy.
  • I confirm that this pull request does not address a security
    vulnerability. If this pull request addresses a security vulnerability, I
    confirm that I got green light (please contact
    security@ory.sh) from the maintainers to push
    the changes.
  • I have added tests that prove my fix is effective or that my feature
    works.
  • I have added necessary documentation within the code base (if
    appropriate).

@nestorvw nestorvw changed the title use int64 type for claims with timestamps feat: use int64 type for claims with timestamps May 24, 2021
@narg95
Copy link
Contributor

narg95 commented May 24, 2021

@aeneasr and @mitar: This PR transform claims with timestamps to int64 data type
Marshalling to a JWT token works out-of-the-box with go-jose, but unmarshalling does not.
Therefore I opened issue #351 in go-jose and in the meantime I workarounded it with a simple float64->int64 conversion on first level claims.

@narg95 narg95 force-pushed the user_int64_timestamps branch 3 times, most recently from 72a7744 to 223ced5 Compare May 24, 2021 15:43
@narg95 narg95 force-pushed the user_int64_timestamps branch from 223ced5 to b6a09a0 Compare May 24, 2021 15:45
@mitar
Copy link
Contributor

mitar commented May 25, 2021

I like it!

@aeneasr
Copy link
Member

aeneasr commented May 27, 2021

Could you please take a look at the failing test cases? Thanks! :)

@narg95 narg95 force-pushed the user_int64_timestamps branch from b31afb3 to 346c3d7 Compare May 27, 2021 19:56
@narg95
Copy link
Contributor

narg95 commented May 27, 2021

fixed

@narg95 narg95 force-pushed the user_int64_timestamps branch from 346c3d7 to 725b149 Compare May 27, 2021 20:02
Copy link
Member

@aeneasr aeneasr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job as always @narg95 - thank you!

@aeneasr aeneasr merged commit c370994 into ory:master May 28, 2021
@narg95
Copy link
Contributor

narg95 commented May 28, 2021

@aeneasr my pleasure :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants