Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix in omniauth-tenzing.gemspec #1

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/omniauth-tenzing/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Omniauth
module Tenzing
VERSION = "0.0.2"
VERSION = "0.0.3"
end
end
19 changes: 6 additions & 13 deletions lib/omniauth/strategies/tenzing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,25 @@ class Tenzing < OmniAuth::Strategies::OAuth2

option :client_options, {
:site => 'http://id.tenzing.urbegi.com',
:access_token_path => '/oauth/access_token',
:authorize_path => '/oauth/authorize'
}

uid { raw_info['id'] }
uid{ raw_info['id'] }

info do
{
:email => raw_info['email'],
:name => raw_info['name'],
:last_name => raw_info['last_name'],
:email => raw_info['email']
}
end

extra do
{ 'raw_info' => raw_info }
{
'raw_info' => raw_info
}
end

def raw_info
@raw_info ||= MultiJson.decode(access_token.get("/api/v1/user_info").body)
@raw_info ||= access_token.get('/me').parsed
end

def request_phase
super
end

end
end
end
Expand Down
4 changes: 2 additions & 2 deletions omniauth-tenzing.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Gem::Specification.new do |s|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]

s.add_dependency 'omniauth', '~> 1.0'
s.add_dependency 'omniauth-oauth2', '~> 1.1'
s.add_dependency 'omniauth'
s.add_dependency 'omniauth-oauth2'

s.add_development_dependency 'rspec', '~> 2.7'
s.add_development_dependency 'rake'
Expand Down