omniauth-soup 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 62f95127dfa889e6a9986792c8a2bb344fa84816
4
+ data.tar.gz: bc48a0b803344ce3d60143db327807208bf6c725
5
+ SHA512:
6
+ metadata.gz: d0f36f5d5faa4d559e0eaee9740936ae287709ee77548a02821df48c8d6664d1d44b6a70b168b7610ce6cabd60e24a286557e43cc75a0fa4e2a230a894809733
7
+ data.tar.gz: c637aee29a4c3277e2fd879388b131c26639eb60e6386e4808b7f3811031a45f7ff2998872bc5b607c6b2d993bb0f3327075c12afc04777a7fb21a18ebb7b8aa
@@ -0,0 +1,2 @@
1
+ require "omniauth-soup/version"
2
+ require "omniauth/strategies/soup"
@@ -0,0 +1,5 @@
1
+ module Omniauth
2
+ module Soup
3
+ VERSION = "0.0.1"
4
+ end
5
+ end
@@ -0,0 +1,41 @@
1
+ require 'omniauth-oauth'
2
+ require 'json'
3
+
4
+ module OmniAuth
5
+ module Strategies
6
+ class Soup < OmniAuth::Strategies::OAuth
7
+
8
+ option :client_options, {
9
+ :site => 'https://api.soup.io',
10
+ :authorize_path => '/oauth/authorize',
11
+ :access_token_path => '/oauth/access_token',
12
+ :request_token_path => '/oauth/request_token'
13
+ }
14
+
15
+ def request_phase
16
+ super
17
+ end
18
+
19
+ uid { raw_info["name"] }
20
+
21
+ info do
22
+ {
23
+ 'name' => raw_info["name"] ,
24
+ 'email' => "",
25
+ 'nickname' => raw_info["name"],
26
+ }
27
+ end
28
+
29
+ extra do
30
+ {:raw_info => raw_info}
31
+ end
32
+
33
+ def raw_info
34
+ @raw_info ||= JSON.parse(access_token.get("/api/v1.1/authenticate").body)["user"]
35
+ end
36
+
37
+ end
38
+ end
39
+ end
40
+
41
+ OmniAuth.config.add_camelization 'soup', 'Soup'
metadata ADDED
@@ -0,0 +1,75 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: omniauth-soup
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - l33tname
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-05-29 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: omniauth-oauth
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: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '1.3'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: '1.3'
41
+ description: A Omniauth gem for Soup.io
42
+ email:
43
+ - hi@l33t.name
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - lib/omniauth-soup.rb
49
+ - lib/omniauth-soup/version.rb
50
+ - lib/omniauth/strategies/soup.rb
51
+ homepage: ''
52
+ licenses:
53
+ - BSD
54
+ metadata: {}
55
+ post_install_message:
56
+ rdoc_options: []
57
+ require_paths:
58
+ - lib
59
+ required_ruby_version: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - '>='
62
+ - !ruby/object:Gem::Version
63
+ version: '0'
64
+ required_rubygems_version: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ requirements: []
70
+ rubyforge_project:
71
+ rubygems_version: 2.0.14
72
+ signing_key:
73
+ specification_version: 4
74
+ summary: This GEM provied a Omniauth strategie to authenticate to Soup.io.
75
+ test_files: []