'Clear all session cookies and replace the current one.
A valid password (`curpass`) must be supplied.'

@validatedForm(VUser(), VModhash(), password=VVerifyPassword('curpass', fatal=False), dest=VDestination())
def POST_clear_sessions(self, form, jquery, password, dest):

    if form.has_errors('curpass', errors.WRONG_PASSWORD):
        return
    form.set_text('.status', _('all    other    sessions    have    been    logged    out'))
    form.set_inputs(curpass='')
    OAuth2AccessToken.revoke_all_by_user(c.user)
    OAuth2RefreshToken.revoke_all_by_user(c.user)
