Method: Github::Client::Authorizations::App#delete
- Defined in:
- lib/github_api/client/authorizations/app.rb
#delete(*args) ⇒ Object Also known as: remove, revoke
Revoke all authorizations for an application
Revoke an authorization for an application
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/github_api/client/authorizations/app.rb', line 73 def delete(*args) raise_authentication_error unless authenticated? params = arguments(args, required: [:client_id]).params if arguments.client_id if access_token = (params.delete('access_token') || args[1]) delete_request("/applications/#{arguments.client_id}/tokens/#{access_token}", params) else # Revokes all tokens delete_request("/applications/#{arguments.client_id}/tokens", params) end else raise raise_app_authentication_error end end |