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

add clock skew to ValidAt #100

Merged
merged 2 commits into from
Dec 1, 2023
Merged

add clock skew to ValidAt #100

merged 2 commits into from
Dec 1, 2023

Conversation

gerardsn
Copy link
Member

@gerardsn gerardsn commented Dec 1, 2023

100!

@@ -477,15 +477,22 @@ func TestVerifiableCredential_ValidAt(t *testing.T) {
hhh := time.Date(2001, 0, 0, 0, 0, 0, 0, time.UTC)

// no validity period is always true; includes missing IssuanceDate(.IsZero() == true)
assert.True(t, VerifiableCredential{}.ValidAt(time.Now()))
assert.True(t, VerifiableCredential{}.ValidAt(time.Now(), 0))
Copy link
Member

Choose a reason for hiding this comment

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

test with non-zero skew?

Copy link
Member

Choose a reason for hiding this comment

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

(now the argument could just be ignored, who knows)

Copy link
Member Author

Choose a reason for hiding this comment

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

added

Copy link
Member Author

Choose a reason for hiding this comment

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

It will be ignored, there are no nbf/exp values set. This only validates it is within the valid window for the given values, not if a value is set.

Copy link
Member

@reinkrul reinkrul left a comment

Choose a reason for hiding this comment

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

tests, rest ok

@gerardsn gerardsn merged commit 6d13fd4 into master Dec 1, 2023
1 check passed
@gerardsn gerardsn deleted the add-clockskew-to-vc_ValidAt branch December 1, 2023 10:11
gerardsn added a commit that referenced this pull request Mar 28, 2024
gerardsn added a commit that referenced this pull request Mar 28, 2024
* Revert "add clock skew to ValidAt (#100)"

This reverts commit 6d13fd4.

* Revert "Add validFrom and validUntil aliases for issuanceDate and expirationDate (#97)"

This reverts commit c2e3cb8.

* keep VC.ValidAt()
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