Sha256: 74685e097c6a79823057b632bf68a6d9a327d76274835ddcbe0be88fef26d0a7
Contents?: true
Size: 715 Bytes
Versions: 3
Compression:
Stored size: 715 Bytes
Contents
# frozen_string_literal: true require 'omniauth-oauth2' module OmniAuth module Strategies class TimeTree < OmniAuth::Strategies::OAuth2 option :name, 'timetree' option :client_options, :site => 'https://timetreeapp.com' uid { raw_info['id'] } extra do {:raw_info => raw_info} end private def raw_info return @raw_info if defined?(@raw_info) endpoint = 'https://timetreeapis.com/user' options = {:headers => {'Accept' => 'application/vnd.timetree.v1+json'}} @raw_info = access_token.get(endpoint, options).parsed end def callback_url full_host + script_name + callback_path end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
omniauth-timetree-0.3.0 | lib/omniauth/strategies/timetree.rb |
omniauth-timetree-0.2.1 | lib/omniauth/strategies/timetree.rb |
omniauth-timetree-0.2.0 | lib/omniauth/strategies/timetree.rb |