def make_signed_jwt(signer, payload):
 header = {'typ': 'JWT', 'alg': 'RS256'}
 segments = [_urlsafe_b64encode(_json_encode(header)), _urlsafe_b64encode(_json_encode(payload))]
 signing_input = '.'.join(segments)
 signature = signer.sign(signing_input)
 segments.append(_urlsafe_b64encode(signature))
 logging.debug(str(segments))
 return '.'.join(segments)

def make_signed_jwt ( signer , payload ) : header = { 'typ' : 'JWT' , 'alg' : 'RS256' } segments = [ _urlsafe_b64encode ( _json_encode ( header ) ) , _urlsafe_b64encode ( _json_encode ( payload ) ) ] signing_input = '.' . join ( segments ) signature = signer . sign ( signing_input ) segments . append ( _urlsafe_b64encode ( signature ) ) logging . debug ( str ( segments ) ) return '.' . join ( segments )
make a signed jwt .