diff options
Diffstat (limited to 'tests/dpop-proof-iat-in-future.scm')
-rw-r--r-- | tests/dpop-proof-iat-in-future.scm | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/tests/dpop-proof-iat-in-future.scm b/tests/dpop-proof-iat-in-future.scm index 4f167ca..b5dd3f8 100644 --- a/tests/dpop-proof-iat-in-future.scm +++ b/tests/dpop-proof-iat-in-future.scm @@ -19,6 +19,7 @@ (webid-oidc jwk) (webid-oidc testing) (webid-oidc errors) + ((webid-oidc parameters) #:prefix p:) (web uri) (srfi srfi-19) (web response)) @@ -28,26 +29,24 @@ (lambda () (define jwk (generate-key #:n-size 2048)) (define cnf (jkt jwk)) - (define blacklist (make-jti-list)) (define proof - (issue-dpop-proof - jwk - #:alg 'RS256 - #:htm 'GET - #:htu (string->uri "https://example.com/res#frag") - #:iat (time-utc->date (make-time time-utc 0 10)))) + (parameterize ((p:current-date 10)) + (issue-dpop-proof + jwk + #:alg 'RS256 + #:htm 'GET + #:htu (string->uri "https://example.com/res#frag")))) (with-exception-handler (lambda (error) (unless ((record-predicate &dpop-signed-in-future) ((record-accessor &cannot-decode-dpop-proof 'cause) error)) (raise-exception error))) (lambda () - (dpop-proof-decode (time-utc->date (make-time time-utc 0 0)) - blacklist - 'GET - (string->uri "https://example.com/res?query") - proof - cnf) + (parameterize ((p:current-date 0)) + (dpop-proof-decode 'GET + (string->uri "https://example.com/res?query") + proof + cnf)) (exit 2)) #:unwind? #t #:unwind-for-type &cannot-decode-dpop-proof))) |