Sha256: 89e8e28aefb3ffcfd39ed692733c7328ca90b97b0dadd72a5fc3614633f75e64

Contents?: true

Size: 806 Bytes

Versions: 8

Compression:

Stored size: 806 Bytes

Contents

module Elasticsearch
  module XPack
    module API
      module Security
        module Actions

          # Delete a token for OAuth 2.0 auhentication
          #
          # @option arguments [Hash] :body The token to invalidate (*Required*)
          #
          # @see https://www.elastic.co/guide/en/x-pack/master/security-api-tokens.html#security-api-invalidate-token
          #
          def invalidate_token(arguments={})
            raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
            method = Elasticsearch::API::HTTP_DELETE
            path   = "_xpack/security/oauth2/token"
            params = {}
            body   = arguments[:body]

            perform_request(method, path, params, body).body
          end
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
elasticsearch-xpack-6.8.1 lib/elasticsearch/xpack/api/actions/security/invalidate_token.rb
elasticsearch-xpack-6.8.0 lib/elasticsearch/xpack/api/actions/security/invalidate_token.rb
elasticsearch-xpack-6.3.1 lib/elasticsearch/xpack/api/actions/security/invalidate_token.rb
elasticsearch-xpack-6.3.0 lib/elasticsearch/xpack/api/actions/security/invalidate_token.rb
elasticsearch-xpack-6.2.0 lib/elasticsearch/xpack/api/actions/security/invalidate_token.rb
elasticsearch-xpack-6.1.0 lib/elasticsearch/xpack/api/actions/security/invalidate_token.rb
elasticsearch-xpack-6.0.0 lib/elasticsearch/xpack/api/actions/security/invalidate_token.rb
elasticsearch-xpack-5.5.0 lib/elasticsearch/xpack/api/actions/security/invalidate_token.rb