def auth_info():
 encoded_info = request.headers.get('X-Endpoint-API-UserInfo', None)
 if encoded_info:
  info_json = _base64_decode(encoded_info)
  user_info = json.loads(info_json)
 else:
  user_info = {'id': 'anonymous'}
 return jsonify(user_info)

def auth_info ( ) : encoded_info = request . headers . get ( 'X-Endpoint-API-UserInfo' , None ) if encoded_info : info_json = _base64_decode ( encoded_info ) user_info = json . loads ( info_json ) else : user_info = { 'id' : 'anonymous' } return jsonify ( user_info )
retrieves the authenication information from google cloud endpoints .