class BotFramework::Connector
Connector
class
Constants
- BOT_CONNECTOR_ISSUER
- CONFIG_URI
- EMULATOR_AUDIENCE
- EMULATOR_AUDIENCE_METADATA
- MSA_AUDIENCE
- MSA_ISSUER
- MSA_OPEN_ID_METADATA
- OPEN_ID_METADATA
- REFRESH_ENDPOINT
- REFRESH_SCOPE
- STATE_END_POINT
Attributes
app_id[RW]
include HTTParty
app_secret[RW]
include HTTParty
token[RW]
include HTTParty
Public Class Methods
new(options = {}) { |self| ... }
click to toggle source
# File lib/bot_framework/connector.rb, line 18 def initialize(options = {}) @app_id = options[:app_id] @app_secret = options[:app_secret] yield(self) if block_given? end
Public Instance Methods
client()
click to toggle source
# File lib/bot_framework/connector.rb, line 24 def client OAuth2::Client.new(app_id, app_secret, authorize_url: 'botframework.com/oauth2/v2.0/authorize', token_url: 'botframework.com/oauth2/v2.0/token', raise_errors: true, site: 'https://login.microsoftonline.com') end
get_token()
click to toggle source
# File lib/bot_framework/connector.rb, line 38 def get_token client.client_credentials.get_token(scope: 'https://api.botframework.com/.default', token_method: :post) end