diff options
Diffstat (limited to 'tests/authorization-endpoint-submit-form.scm')
-rw-r--r-- | tests/authorization-endpoint-submit-form.scm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/authorization-endpoint-submit-form.scm b/tests/authorization-endpoint-submit-form.scm index 4f11db0..78216a9 100644 --- a/tests/authorization-endpoint-submit-form.scm +++ b/tests/authorization-endpoint-submit-form.scm @@ -23,6 +23,7 @@ #:use-module (webid-oidc jti) #:use-module (webid-oidc testing) #:use-module ((webid-oidc parameters) #:prefix p:) + #:use-module ((webid-oidc stubs) #:prefix stubs:) #:use-module (web uri) #:use-module (web request) #:use-module (web response) @@ -37,7 +38,6 @@ (with-test-environment "authorization-endpoint-submit-form" (lambda () - (define key (generate-key #:n-size 2048)) (define subject (string->uri "https://authorization-endpoint-submit-form.scm/profile/card#me")) (define client (string->uri "https://authorization-endpoint-submit-form.scm/client/card#app")) (define redirect (string->uri "https://authorization-endpoint-submit-form.scm/client/redirect")) @@ -55,7 +55,7 @@ (define the-response-body (cdr served)) (define endpoint (make-authorization-endpoint - subject encrypted-password key)) + subject encrypted-password "key-file.jwk")) (parameterize ((p:anonymous-http-request (lambda* (uri #:key (headers '()) #:allow-other-keys) (unless (equal? uri what-uri-to-expect) @@ -113,6 +113,9 @@ (parameterize ((p:current-date 60)) (decode <authorization-code> (car (assoc-ref args "code")) - #:issuer-key key)))) + #:issuer-key + (call-with-input-file "key-file.jwk" + (lambda (port) + (jwk->key (stubs:json->scm port)))))))) (unless parsed (exit 10)))))))))))) |