(encoded_section)
Decodes a single JWT segment.
Decodes a single JWT segment.
Decodes a single JWT segment .
def _decode_jwt_segment(encoded_section):
    """Decodes a single JWT segment."""
    section_bytes = _helpers.padded_urlsafe_b64decode(encoded_section)
    try:
        return json.loads(section_bytes.decode("utf-8"))
    except ValueError as caught_exc:
        new_exc = ValueError("Can't parse segment: {0}".format(section_bytes))
        six.raise_from(new_exc, caught_exc)
def _decode_jwt_segment ( encoded_section ) : section_bytes = _helpers . padded_urlsafe_b64decode ( encoded_section ) try : return json . loads ( section_bytes . decode ( "utf-8" ) ) except ValueError as caught_exc : new_exc = ValueError ( "Can't parse segment: {0}" . format ( section_bytes ) ) six . raise_from ( new_exc , caught_exc )