feat(oauth): add OAuthClient:clear_tokens() method
Problem: no way to wipe just the token file while keeping credentials intact — `_wipe()` removed both. Solution: add `clear_tokens()` that removes only the token file.
This commit is contained in:
parent
628286c471
commit
fadad3ed95
1 changed files with 5 additions and 0 deletions
|
|
@ -496,6 +496,11 @@ function OAuthClient:_wipe()
|
||||||
os.remove(vim.fn.stdpath('data') .. '/pending/google_credentials.json')
|
os.remove(vim.fn.stdpath('data') .. '/pending/google_credentials.json')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
---@return nil
|
||||||
|
function OAuthClient:clear_tokens()
|
||||||
|
os.remove(self:token_path())
|
||||||
|
end
|
||||||
|
|
||||||
---@param opts { name: string, scope: string, port: integer, config_key: string }
|
---@param opts { name: string, scope: string, port: integer, config_key: string }
|
||||||
---@return pending.OAuthClient
|
---@return pending.OAuthClient
|
||||||
function M.new(opts)
|
function M.new(opts)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue