def get_token(self):
    request = self.application.make('request')
    token = request.input('token')
    if token:
        return token
    header = request.header('Authorization')
    if header:
        return header.replace('Bearer ', '')
def get_token(self):
    request = self.application.make('request')
    token = request.input('token')
    if token:
        return token
    header = request.header('Authorization')
    if header:
        return header.replace('Bearer ', )