Sha256: 9485ae60040cade270689f9093715ccec936605591cc1f0e6eeefe6e2634d1fe

Contents?: true

Size: 761 Bytes

Versions: 3

Compression:

Stored size: 761 Bytes

Contents

require_relative 'bamboo_url.rb'
require_relative 'base_oauth_token_url.rb'

module BambooId
  module Urls
    class OauthTokenUrl
      include BambooUrl
      include BaseOauthTokenUrl

      def initialize(temporary_code:, subdomain:, grant_type: 'authorization_code')
        self.temporary_code = temporary_code
        self.subdomain      = subdomain
        self.grant_type     = grant_type
      end

      private

      attr_accessor :subdomain

      def base_url
        "https://#{subdomain}.bamboohr.com/token.php?request=token"
      end

      def client_secret
        Configuration.client_secret
      end

      def redirect_uri
        Configuration.redirect_url
      end

      def scope
        'openid email'
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bamboo-id-0.1.3 lib/bamboo_id/urls/oauth_token_url.rb
bamboo-id-0.1.2 lib/bamboo_id/urls/oauth_token_url.rb
bamboo-id-0.1.1 lib/bamboo_id/urls/oauth_token_url.rb