From 0f8a94bc223fd19891a9c5bb667f4ce3704ecb8d Mon Sep 17 00:00:00 2001 From: Vivien Kraus Date: Thu, 11 Nov 2021 16:46:38 +0000 Subject: Endpoint: fix exception raising. --- .../server/endpoint/identity-provider.scm | 30 ++++++++++++---------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/src/scm/webid-oidc/server/endpoint/identity-provider.scm b/src/scm/webid-oidc/server/endpoint/identity-provider.scm index 57892c7..68bb154 100644 --- a/src/scm/webid-oidc/server/endpoint/identity-provider.scm +++ b/src/scm/webid-oidc/server/endpoint/identity-provider.scm @@ -341,26 +341,28 @@ (with-exception-handler (lambda (exn) (raise-exception - (make-web-exception 400 (W_ "reason-phrase|Bad Request")) - (make-user-message - (call-with-input-string - (format #f (W_ "

The client, ~a, cannot be queried.

") - (uri->string client-id) - (uri->string client-id)) - xml->sxml)) - exn)) + (make-exception + (make-web-exception 400 (W_ "reason-phrase|Bad Request")) + (make-user-message + (call-with-input-string + (format #f (W_ "

The client, ~a, cannot be queried.

") + (uri->string client-id) + (uri->string client-id)) + xml->sxml)) + exn))) (lambda () (make #:client-id client-id))))) (with-exception-handler (lambda (exn) (raise-exception - (make-web-exception 400 (W_ "reason-phrase|Bad Request")) - (make-user-message - (call-with-input-string - (format #f (W_ "

The real client at ~a does not control the advertised redirection URI.

")) - xml->sxml)) - exn)) + (make-exception + (make-web-exception 400 (W_ "reason-phrase|Bad Request")) + (make-user-message + (call-with-input-string + (format #f (W_ "

The real client at ~a does not control the advertised redirection URI.

")) + xml->sxml)) + exn))) (lambda () (check-redirect-uri mf redirect-uri))) (values -- cgit v1.2.3