Sha256: 8de0eef9dcf6b95269918a237e6b0b7b3a83d7806e535b566d02733ed466afbd
Contents?: true
Size: 795 Bytes
Versions: 1
Compression:
Stored size: 795 Bytes
Contents
require 'omniauth-oauth2' require 'multi_json' module OmniAuth module Strategies class Clio < OmniAuth::Strategies::OAuth2 option :name, "clio" option :client_options, { :site => 'https://app.goclio.com', :authorize_url => '/oauth/authorize', :token_url => '/oauth/token' } uid { raw_info['user']['id']} info do { :last_name => raw_info['user']['last_name'], :first_name => raw_info['user']['first_name'], :email => raw_info['user']['email'], :firm => raw_info['account']['name'], } end extra do {:raw_info => raw_info} end def raw_info @raw_info access_token.get('/api/v1/users/who_am_i').parsed) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
omniauth-clio-0.5.2 | lib/omniauth/strategies/Clio.rb |