def refresh(self): """ Create a new token while retaining the refresh token. """ if self.refresh_token is not None: self.token = newid() self.secret = newsecret()
def __init__(self, **kwargs): super(AuthToken, self).__init__(**kwargs) self.token = newid() self.refresh_token = newid() self.secret = newsecret()