Sha256: 979dfefe8d56a439a6ee296315170a186e3ebf7e1070726dd407d8cb703c2f8c

Contents?: true

Size: 619 Bytes

Versions: 2

Compression:

Stored size: 619 Bytes

Contents

# frozen_string_literal: true

require 'omniauth-oauth2'
require 'tanita/api/client'

module OmniAuth
  module Strategies
    TANITA = Tanita::Api::Client

    class Tanita < OmniAuth::Strategies::OAuth2
      option :name, 'tanita'

      option :skip_info, true
      option :provider_ignores_state, true
      option :scope, TANITA::Scope::INNERSCAN

      option :client_options, :site => TANITA::BASE_URL,
               :authorize_url => TANITA::AUTH_URL_PATH,
               :token_url => TANITA::TOKEN_URL_PATH

      def callback_url
        full_host + script_name + callback_path
     end

    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
omniauth-tanita-0.2.3 lib/omniauth/strategies/tanita.rb
omniauth-tanita-0.2.2 lib/omniauth/strategies/tanita.rb