summaryrefslogtreecommitdiff
path: root/src/scm/webid-oidc/identity-provider.scm
diff options
context:
space:
mode:
Diffstat (limited to 'src/scm/webid-oidc/identity-provider.scm')
-rw-r--r--src/scm/webid-oidc/identity-provider.scm26
1 files changed, 19 insertions, 7 deletions
diff --git a/src/scm/webid-oidc/identity-provider.scm b/src/scm/webid-oidc/identity-provider.scm
index de49fc5..8df4386 100644
--- a/src/scm/webid-oidc/identity-provider.scm
+++ b/src/scm/webid-oidc/identity-provider.scm
@@ -246,8 +246,8 @@ by shepherd in reality):
--subject https://webid-oidc-demo.planete-kraus.eu/profile/card#me \\
--password \"$PASSWORD\" \\
--jwks-uri https://webid-oidc-demo.planete-kraus.eu/keys \\
- --authorization-endpoint https://webid-oidc-demo.planete-kraus.eu/authorize \\
- --token-endpoint https://webid-oidc-demo.planete-kraus.eu/token \\
+ --authorization-endpoint-uri https://webid-oidc-demo.planete-kraus.eu/authorize \\
+ --token-endpoint-uri https://webid-oidc-demo.planete-kraus.eu/token \\
--port $PORT
If you find a bug, send a report to ~a.
@@ -284,10 +284,10 @@ If you find a bug, send a report to ~a.
(option-ref options error-file-sym #f))
(jti-list (make-jti-list)))
(when log-file-string
- (set-current-output-port (open-output-file* log-file-string))
+ (set-current-output-port (stubs:open-output-file* log-file-string))
(setvbuf (current-output-port) 'none))
(when error-file-string
- (set-current-error-port (open-output-file* error-file-string))
+ (set-current-error-port (stubs:open-output-file* error-file-string))
(setvbuf (current-error-port) 'none))
(unless (and issuer (string->uri issuer))
(format (current-error-port)
@@ -343,13 +343,25 @@ If you find a bug, send a report to ~a.
(with-exception-handler
(lambda (error)
(format (current-error-port)
- (G_ "Internal server error: ~a\n")
+ (G_ "~a: Internal server error: ~a\n")
+ (date->string (time-utc->date (current-time)))
(error->str error))
(values
(build-response #:code 500
#:reason-phrase "Internal Server Error")
"Sorry, there was an error."))
(lambda ()
- (handler request request-body))))))
+ (with-exception-handler
+ (lambda (error)
+ (format (current-error-port)
+ (G_ "The client locale ~s can’t be approximated by system locale ~s (because ~a), using C.\n")
+ ((record-accessor &unknown-client-locale 'web-locale) error)
+ ((record-accessor &unknown-client-locale 'c-locale) error)
+ (error->str error)))
+ (lambda ()
+ (handler request request-body))
+ #:unwind? #t
+ #:unwind-for-type &unknown-client-locale))
+ #:unwind? #t))))
(install-suspendable-ports!)
- (run-server handler 'http (list #:port (string->number port-string)))))))))))
+ (run-server handler-with-log 'http (list #:port (string->number port-string)))))))))))