omniauth-genius 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/omniauth-genius.rb +1 -0
- data/lib/omniauth-genius/version.rb +5 -0
- data/lib/omniauth/strategies/genius.rb +36 -0
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3efd8bc49fefeb566725a8c513ba45cec4ebae12
|
4
|
+
data.tar.gz: 6b42bfaa9b6668f1312e5a6e3ed9788a5fe290a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f8bd663f64c888fd1ac149495de7e96197c8f4d84d37f46b204ab9643422a270e8b56688914db10e1a3e8214ce2ffc74aea832233b7bc2a9c35b1390eb56798
|
7
|
+
data.tar.gz: c0b292a9d9da619a84278fc4af8cda7947b9d1038728b50239e48ba8f5bf9139c9cc655d333f5c5c4038dfdc07195fdc13ddb3cc36a496f78b4e7ff9e89dc44e
|
@@ -0,0 +1 @@
|
|
1
|
+
require_relative 'omniauth/strategies/genius'
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require 'omniauth-oauth2'
|
2
|
+
|
3
|
+
module OmniAuth
|
4
|
+
module Strategies
|
5
|
+
class Genius < OmniAuth::Strategies::OAuth2
|
6
|
+
|
7
|
+
option :name, 'genius'
|
8
|
+
|
9
|
+
option :client_options, {
|
10
|
+
site: 'https://api.genius.com'
|
11
|
+
}
|
12
|
+
|
13
|
+
uid do
|
14
|
+
raw_info['id']
|
15
|
+
end
|
16
|
+
|
17
|
+
info do
|
18
|
+
{
|
19
|
+
:id => raw_info['id'],
|
20
|
+
:name => raw_info['name'],
|
21
|
+
:login => raw_info['login'],
|
22
|
+
:iq => raw_info['iq']
|
23
|
+
}
|
24
|
+
end
|
25
|
+
|
26
|
+
extra do
|
27
|
+
raw_info
|
28
|
+
end
|
29
|
+
|
30
|
+
def raw_info
|
31
|
+
@raw_info ||= access_token.get('/account').parsed['response']['user']
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-genius
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- john@genius.com
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth
|
@@ -43,7 +43,10 @@ email:
|
|
43
43
|
executables: []
|
44
44
|
extensions: []
|
45
45
|
extra_rdoc_files: []
|
46
|
-
files:
|
46
|
+
files:
|
47
|
+
- lib/omniauth-genius.rb
|
48
|
+
- lib/omniauth-genius/version.rb
|
49
|
+
- lib/omniauth/strategies/genius.rb
|
47
50
|
homepage:
|
48
51
|
licenses: []
|
49
52
|
metadata: {}
|