Class: Slack::Oauth2::FlowBase

Inherits:
Object
  • Object
show all
Defined in:
lib/slack/oauth2/flow_base.rb

Overview

Base class for the OAuth 2 authorization helpers.

Direct Known Subclasses

Flow

Instance Method Summary collapse

Constructor Details

#initialize(consumer_key, consumer_secret, scope, team) ⇒ FlowBase

Returns a new instance of FlowBase.



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/slack/oauth2/flow_base.rb', line 10

def initialize(consumer_key, consumer_secret, scope, team)
  unless consumer_key.is_a?(String)
    raise ArgumentError, "consumer_key must be a String, got #{consumer_key.inspect}"
  end
  unless consumer_secret.is_a?(String)
    raise ArgumentError, "consumer_secret must be a String, got #{consumer_secret.inspect}"
  end
  unless scope.is_a?(String)
    raise ArgumentError, "scope must be a String, got #{scope.inspect}"
  end

  @consumer_key = consumer_key
  @consumer_secret = consumer_secret
  @scope = scope
  @team = team
end