summaryrefslogtreecommitdiff
path: root/src/scm/webid-oidc/errors.scm
diff options
context:
space:
mode:
Diffstat (limited to 'src/scm/webid-oidc/errors.scm')
-rw-r--r--src/scm/webid-oidc/errors.scm51
1 files changed, 51 insertions, 0 deletions
diff --git a/src/scm/webid-oidc/errors.scm b/src/scm/webid-oidc/errors.scm
index b575a77..a690088 100644
--- a/src/scm/webid-oidc/errors.scm
+++ b/src/scm/webid-oidc/errors.scm
@@ -54,6 +54,36 @@
(raise-exception
((record-constructor &not-a-jwk) value cause)))
+(define-public &not-a-public-jwk
+ (make-exception-type
+ '&not-a-public-jwk
+ &external-error
+ '(value cause)))
+
+(define-public (raise-not-a-public-jwk value cause)
+ (raise-exception
+ ((record-constructor &not-a-public-jwk) value cause)))
+
+(define-public &not-a-private-jwk
+ (make-exception-type
+ '&not-a-private-jwk
+ &external-error
+ '(value cause)))
+
+(define-public (raise-not-a-private-jwk value cause)
+ (raise-exception
+ ((record-constructor &not-a-private-jwk) value cause)))
+
+(define-public &not-a-jwks
+ (make-exception-type
+ '&not-a-jwks
+ &external-error
+ '(value cause)))
+
+(define-public (raise-not-a-jwks value cause)
+ (raise-exception
+ ((record-constructor &not-a-jwks) value cause)))
+
(define-public &unsupported-alg
(make-exception-type
'&unsupported-alg
@@ -92,6 +122,27 @@
(get 'value) cause)
(format #f (G_ "the value ~s does not identify a JWK")
(get 'value)))))
+ ((&not-a-public-jwk)
+ (let ((cause (get 'cause)))
+ (if cause
+ (format #f (G_ "the value ~s does not identify a public JWK (because ~a)")
+ (get 'value) cause)
+ (format #f (G_ "the value ~s does not identify a public JWK")
+ (get 'value)))))
+ ((&not-a-private-jwk)
+ (let ((cause (get 'cause)))
+ (if cause
+ (format #f (G_ "the value ~s does not identify a private JWK (because ~a)")
+ (get 'value) cause)
+ (format #f (G_ "the value ~s does not identify a private JWK")
+ (get 'value)))))
+ ((&not-a-jwks)
+ (let ((cause (get 'cause)))
+ (if cause
+ (format #f (G_ "the value ~s does not identify a JWKS (because ~a)")
+ (get 'value) cause)
+ (format #f (G_ "the value ~s does not identify a JWKS")
+ (get 'value)))))
((&unsupported-alg)
(format #f (G_ "the value ~s does not identify a hash algorithm")
(get 'value)))