omniauth-auphonic 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/lib/omniauth/strategies/auphonic.rb +39 -0
- data/lib/omniauth-auphonic/version.rb +5 -0
- data/lib/omniauth-auphonic.rb +2 -0
- metadata +103 -0
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
NWZiNTVjMmFlN2ExNmYzM2Q3ODExMTBmMDA3NGNmYTczOWVmMmM5OA==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
NWViZjlhNmM1YjQ4ODI3MjhjZDlmNmY4NzhmZmU2NTk4Y2Y5NDI2NA==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
ZjU3ZGNlNDI3MzZiZDY3N2M1NDc0YTUxN2JiNDUzOTg3NzY3ZTRkNTI0YTBj
|
10
|
+
MzNlY2NmMjkxZjYzNWVmYTQwYTE2ZDJjOGE3ZjU5YzI0YjQzNTFkNDc0NjA5
|
11
|
+
YjdmNGJjNzNhZWFhOGQ0MmY5NTc0NTQwZTQwMzIxMGY3NzY1YWQ=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
MTRmZWVlMGQwZTc1NDIzMjg2MjlmMTk4YjI2MzMzZjA2NDkyMzZiZjQwY2Ni
|
14
|
+
NDY1OWE3ODJjNWI4ZDI2ZDQyYzZmZjI5ODRiNmUxYTEyYzkwOTEzMTViMDE2
|
15
|
+
NzcyN2QwZGRlNzJhMzc3NmY4NTk1YzA4ZWRiZTA1MTNjMTkyZGQ=
|
@@ -0,0 +1,39 @@
|
|
1
|
+
require 'omniauth-oauth2'
|
2
|
+
|
3
|
+
module OmniAuth
|
4
|
+
module Strategies
|
5
|
+
class Auphonic < OmniAuth::Strategies::OAuth2
|
6
|
+
|
7
|
+
option :client_options, {
|
8
|
+
:site => 'https://auphonic.com/api',
|
9
|
+
:authorize_url => 'https://auphonic.com/oauth2/authorize/',
|
10
|
+
:token_url => 'https://auphonic.com/oauth2/token'
|
11
|
+
}
|
12
|
+
|
13
|
+
def request_phase
|
14
|
+
super
|
15
|
+
end
|
16
|
+
|
17
|
+
uid { raw_info['user_id'] }
|
18
|
+
|
19
|
+
info do
|
20
|
+
{
|
21
|
+
'name' => raw_info['username'],
|
22
|
+
'email' => raw_info['email'],
|
23
|
+
'nickname' => raw_info['username']
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
extra do
|
28
|
+
{:raw_info => raw_info}
|
29
|
+
end
|
30
|
+
|
31
|
+
def raw_info
|
32
|
+
@raw_info ||= access_token.get("/api/user.json").parsed["data"]
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
OmniAuth.config.add_camelization 'auphonic', 'Auphonic'
|
metadata
ADDED
@@ -0,0 +1,103 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: omniauth-auphonic
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- fliiiix
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-01-05 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: omniauth
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: omniauth-oauth2
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.1'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.1'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.3'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.3'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ! '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description: A Omniauth gem for Auphonic
|
70
|
+
email:
|
71
|
+
- de-ch@hotmail.de
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- lib/omniauth-auphonic.rb
|
77
|
+
- lib/omniauth-auphonic/version.rb
|
78
|
+
- lib/omniauth/strategies/auphonic.rb
|
79
|
+
homepage: ''
|
80
|
+
licenses:
|
81
|
+
- BSD
|
82
|
+
metadata: {}
|
83
|
+
post_install_message:
|
84
|
+
rdoc_options: []
|
85
|
+
require_paths:
|
86
|
+
- lib
|
87
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - ! '>='
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '0'
|
92
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ! '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
requirements: []
|
98
|
+
rubyforge_project:
|
99
|
+
rubygems_version: 2.2.0
|
100
|
+
signing_key:
|
101
|
+
specification_version: 4
|
102
|
+
summary: A Omniauth gem for Auphonic
|
103
|
+
test_files: []
|