Welcome to the CHICKEN Scheme pasting service

beginning of a function added by curium on Tue May 10 16:42:44 2022

(define (validate-jwt->junk jwt)
  (call/cc
   (lambda (return)
     (define jwt-components (string-split jwt "."))
     (unless (= (length jwt-components) 3)
       (return #f))

     (define jose-header (read-json (car jwt-components)))
     (define jws-payload (read-json (cadr jwt-components)))
     (define jws-signature (caddr jwt-components))
     (unless (and jose-header jws-payload)
       (return #f))

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
Which module provides `foreign-declare'?
Visually impaired? Let me spell it for you (wav file) download WAV