separators is used in dumps:
# - without it&#39;s use, output of dumps is: &#39;{&#34;alg&#34;: &#34;RS256&#34;, &#34;typ&#34;: &#34;JWT&#34;, &#34;version&#34;: &#34;1&#34;}&#39;
# - with it&#39;s use, output of dumps is: &#39;{&#34;alg&#34;:&#34;RS256&#34;,&#34;typ&#34;:&#34;JWT&#34;,&#34;version&#34;:&#34;1&#34;}&#39;
# we require the non-spaced version, else the base64 encoding string will end up different than required
_allowed_headers = [
    utf_base64encode(
        dumps(
            {&#34;alg&#34;