omniauth-td 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +2 -1
- data/lib/omniauth-td/version.rb +1 -1
- data/lib/omniauth/strategies/td.rb +12 -4
- data/omniauth-td.gemspec +1 -1
- metadata +5 -6
data/README.md
CHANGED
data/lib/omniauth-td/version.rb
CHANGED
@@ -23,17 +23,25 @@ module OmniAuth
|
|
23
23
|
mail = request['email']
|
24
24
|
pass = request['password']
|
25
25
|
begin
|
26
|
+
api = TreasureData::Client.authenticate(mail, pass)
|
27
|
+
cln = TreasureData::Client.initialize(api.apikey)
|
26
28
|
@identity ||= {
|
27
|
-
:
|
28
|
-
:apikey =>
|
29
|
+
:account_id => cln.account.account_id,
|
30
|
+
:apikey => api.apikey,
|
31
|
+
:email => request['email']
|
29
32
|
}
|
30
33
|
rescue => e
|
31
34
|
return fail!(:invalid_credentials)
|
32
35
|
end
|
33
36
|
super
|
34
37
|
end
|
35
|
-
uid { @identity[:
|
36
|
-
info {
|
38
|
+
uid { @identity[:account_id] }
|
39
|
+
info {
|
40
|
+
{
|
41
|
+
:account_id => @identity[:account_id],
|
42
|
+
:email => @identity[:email]
|
43
|
+
}
|
44
|
+
}
|
37
45
|
credentials { {:apikey => @identity[:apikey]} }
|
38
46
|
end
|
39
47
|
end
|
data/omniauth-td.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-td
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-10-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: omniauth
|
@@ -34,7 +34,7 @@ dependencies:
|
|
34
34
|
requirements:
|
35
35
|
- - ~>
|
36
36
|
- !ruby/object:Gem::Version
|
37
|
-
version: 0.8.
|
37
|
+
version: 0.8.35
|
38
38
|
type: :runtime
|
39
39
|
prerelease: false
|
40
40
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -42,7 +42,7 @@ dependencies:
|
|
42
42
|
requirements:
|
43
43
|
- - ~>
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version: 0.8.
|
45
|
+
version: 0.8.35
|
46
46
|
description: OmniAuth strategy for Treasure Data
|
47
47
|
email:
|
48
48
|
- kazuki.ohta@gmail.com
|
@@ -80,9 +80,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
80
80
|
version: '0'
|
81
81
|
requirements: []
|
82
82
|
rubyforge_project:
|
83
|
-
rubygems_version: 1.8.
|
83
|
+
rubygems_version: 1.8.24
|
84
84
|
signing_key:
|
85
85
|
specification_version: 3
|
86
86
|
summary: OmniAuth strategy for Treasure Data
|
87
87
|
test_files: []
|
88
|
-
has_rdoc:
|