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

refactor: Generate claims in the same way #595

Merged
merged 1 commit into from
May 19, 2021

Conversation

mitar
Copy link
Contributor

@mitar mitar commented May 14, 2021

This is a followup to #522.

@mitar
Copy link
Contributor Author

mitar commented May 14, 2021

I think this addresses your concerns from #522. Extra cannot override anything. But we also remove any fields which would have invalid value/is not provided.

@@ -75,7 +75,7 @@ func TestAssert(t *testing.T) {
ToMapClaims().Valid())
assert.NotNil(t, (&JWTClaims{NotBefore: time.Now().UTC().Add(time.Hour)}).
ToMapClaims().Valid())
assert.NotNil(t, (&JWTClaims{NotBefore: time.Now().UTC().Add(-time.Hour)}).
assert.Nil(t, (&JWTClaims{NotBefore: time.Now().UTC().Add(-time.Hour)}).
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@aeneasr aeneasr merged commit 4c7b13f into ory:master May 19, 2021
@mitar mitar deleted the claims-generation branch May 20, 2021 23:35
narg95 pushed a commit to narg95/fosite that referenced this pull request May 22, 2021
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.

2 participants