diff options
author | Vivien Kraus <vivien@planete-kraus.eu> | 2021-07-27 20:30:37 +0200 |
---|---|---|
committer | Vivien Kraus <vivien@planete-kraus.eu> | 2021-07-29 18:43:54 +0200 |
commit | abd22d93f6e61e0d62d340def3526931f042c910 (patch) | |
tree | 82153810936409f8e51ae722d96d0e845b2974d4 /tests | |
parent | 8c89e88577dd2da79559f03a901339013da1e162 (diff) |
The client manifest spec changed: now it’s a plain OIDC registration token.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/client-manifest-fraudulent.scm | 9 | ||||
-rw-r--r-- | tests/client-manifest.scm | 13 |
2 files changed, 8 insertions, 14 deletions
diff --git a/tests/client-manifest-fraudulent.scm b/tests/client-manifest-fraudulent.scm index a43039d..da77c27 100644 --- a/tests/client-manifest-fraudulent.scm +++ b/tests/client-manifest-fraudulent.scm @@ -36,9 +36,7 @@ (define what-to-respond (build-response #:headers '((content-type text/turtle)))) (define what-to-respond-body - "@prefix solid: <http://www.w3.org/ns/solid/terms#> . - -<#app> solid:oidcRegistration \"\"\"{ + "{ \"client_id\" : \"https://app.example.com/id#app\", \"redirect_uris\" : [\"https://app.example.com/callback\"], \"client_name\" : \"Solid Application Name\", @@ -50,10 +48,9 @@ \"response_types\" : [\"code\"], \"default_max_age\" : 60000, \"require_auth_time\" : true - }\"\"\" . -") + }") (define headers-to-expect - '((accept (text/turtle application/n-quads application/ld+json)))) + '()) (define uri-to-expect (string->uri "https://fraudulent-app.example.com/id#app")) (define* (respond uri #:key (headers '())) diff --git a/tests/client-manifest.scm b/tests/client-manifest.scm index ba8a79a..fb40901 100644 --- a/tests/client-manifest.scm +++ b/tests/client-manifest.scm @@ -28,11 +28,9 @@ "client-manifest" (lambda () (define what-to-respond - (build-response #:headers '((content-type text/turtle)))) + (build-response #:headers '((content-type application/ld+json)))) (define what-to-respond-body - "@prefix solid: <http://www.w3.org/ns/solid/terms#> . - -<#app> solid:oidcRegistration \"\"\"{ + "{ \"client_id\" : \"https://app.example.com/id#app\", \"redirect_uris\" : [\"https://app.example.com/callback\"], \"client_name\" : \"Solid Application Name\", @@ -44,10 +42,9 @@ \"response_types\" : [\"code\"], \"default_max_age\" : 60000, \"require_auth_time\" : true - }\"\"\" . -") +}") (define* (respond uri #:key (headers '())) - (unless (equal? headers '((accept (text/turtle application/n-quads application/ld+json)))) + (unless (equal? headers '()) (exit 1)) (when (string? uri) (set! uri (string->uri uri))) @@ -84,7 +81,7 @@ (serve-client-manifest (time-utc->date (make-time time-utc 0 3600)) mf) - (unless (equal? (response-content-type response) '(text/turtle)) + (unless (equal? (response-content-type response) '(application/ld+json)) (exit 6)) (set! what-to-respond response) (set! what-to-respond-body response-body) |