def get_token_issuer(token):
try:<EOL><INDENT>unverified = decode_token(token)<EOL>if '<STR_LIT>' not in unverified:<EOL><INDENT>raise TokenIssuerError<EOL><DEDENT>return unverified.get('<STR_LIT>')<EOL><DEDENT>except jwt.DecodeError:<EOL><INDENT>raise TokenDecodeError<EOL><DEDENT>
Issuer of a token is the identifier used to recover the secret
Need to extract this from token to ensure we can proceed to the signature validation stage
Does not check validity of the token
:param token: signed JWT token
:return issuer: iss field of the JWT token
:raises TokenIssuerError: if iss field not present
:raises TokenDecodeError: if token does not conform to JWT spec