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) :
Type in the text below:
 _                 _         _ 
| |__ _____ __ ___| | _____ (_)
| '_ \_  / '__/ __| |/ / _ \| |
| |_) / /| | | (__|   <  __/| |
|_.__/___|_|  \___|_|\_\___|/ |
                          |__/ 
Visually impaired? Let me spell it for you (wav file) download WAV