Sha256: 1bb4483ad4838c7386d81b6bbbcc5d70c052ddcadd25b2540001da0c5d888cf5

Contents?: true

Size: 1.33 KB

Versions: 3

Compression:

Stored size: 1.33 KB

Contents

# This file was auto-generated by lib/generators/tasks/generate.rb

module Slack
  module Endpoint
    module Auth
      #
      # This method revokes an access token. Use it when you no longer need a token. For example, with a Sign In With Slack app, call this to log a user out.
      #
      # @option options [Object] :test
      #   Setting this parameter to 1 triggers a testing mode where the specified token will not actually be revoked.
      # @see https://api.slack.com/methods/auth.revoke
      # @see https://github.com/aki017/slack-api-docs/blob/master/methods/auth.revoke.md
      # @see https://github.com/aki017/slack-api-docs/blob/master/methods/auth.revoke.json
      def auth_revoke(options={})
        options[:attachments] = options[:attachments].to_json if Hash === options[:attachments]
        post("auth.revoke", options)
      end

      #
      # This method checks authentication and tells you who you are.
      #
      # @see https://api.slack.com/methods/auth.test
      # @see https://github.com/aki017/slack-api-docs/blob/master/methods/auth.test.md
      # @see https://github.com/aki017/slack-api-docs/blob/master/methods/auth.test.json
      def auth_test(options={})
        options[:attachments] = options[:attachments].to_json if Hash === options[:attachments]
        post("auth.test", options)
      end

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
slack-api-1.4.0 lib/slack/endpoint/auth.rb
slack-api-1.3.0 lib/slack/endpoint/auth.rb
slack-api-1.2.4 lib/slack/endpoint/auth.rb