omniauth-yokitup-oauth2 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: c65f7fdc779fb0f1b76215ea8596068666dbf91d
4
+ data.tar.gz: e21a4e1f50c73a67667c362edae1f02f69ee402e
5
+ SHA512:
6
+ metadata.gz: f89c44616de86e83f6d3512bdb4f74bda429e67babdaae2d9e1f5d791df34841875a077db775d1703551e0d2ef35559286e72150111c09c54f12fffbd28eadb4
7
+ data.tar.gz: 66358079e8511f37c7b4a5598ce7632878badc0b3a4cb4a3515566b515eed0bdd6467979252801a80ec621f7943ab506b48767d1e8377444f6603ff26af07af4
data/.gitignore ADDED
@@ -0,0 +1,4 @@
1
+ .DS_Store
2
+ /.bundle/
3
+ /pkg/
4
+ Gemfile.lock
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
data/LICENSE.md ADDED
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2019 Jonathan VUKOVICH-TRIBOUHARET
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in
11
+ all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,29 @@
1
+ # OmniAuth Yokitup OAuth2
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/omniauth-yokitup-oauth2.svg)](http://badge.fury.io/rb/omniauth-yokitup-oauth2)
4
+
5
+ Strategy to authenticate [Yokitup](https://www.yokitup.com) in OmniAuth.
6
+
7
+ ## Installation
8
+
9
+ OmniAuth Yokitup OAuth2 is distributed as a gem, which is how it should be used in your app.
10
+
11
+ Include the gem in your Gemfile:
12
+
13
+ gem 'omniauth-yokitup-oauth2', '~> 1.0'
14
+
15
+ Integrate this strategy to your OmniAuth middleware.
16
+
17
+ ```ruby
18
+ Rails.application.config.middleware.use OmniAuth::Builder do
19
+ provider :yokitup, ENV['YOKITUP_CLIENT_ID'], ENV['YOKITUP_SECRET']
20
+ end
21
+ ```
22
+
23
+ ## Author
24
+
25
+ - [Jonathan VUKOVICH-TRIBOUHARET](https://github.com/jonathantribouharet) ([@johnvuko](https://twitter.com/johnvuko))
26
+
27
+ ## License
28
+
29
+ This project is released under the MIT license. See the LICENSE file for more info.
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require 'bundler/gem_tasks'
@@ -0,0 +1,2 @@
1
+ require "omniauth-yokitup-oauth2/version"
2
+ require 'omniauth/strategies/yokitup'
@@ -0,0 +1,5 @@
1
+ module OmniAuth
2
+ module Yokitup
3
+ VERSION = '1.0.1'
4
+ end
5
+ end
@@ -0,0 +1,36 @@
1
+ require 'omniauth-oauth2'
2
+
3
+ module OmniAuth
4
+ module Strategies
5
+ class Yokitup < OmniAuth::Strategies::OAuth2
6
+
7
+ option :name, 'yokitup'
8
+
9
+ option :client_options, { site: 'https://id.yokitup.com' }
10
+
11
+ uid { raw_info['id'] }
12
+
13
+ info do
14
+ {
15
+ email: raw_info['email'],
16
+ name: "#{raw_info['first_name']} #{raw_info['last_name']}",
17
+ first_name: raw_info['first_name'],
18
+ last_name: raw_info['last_name'],
19
+ time_zone: raw_info['time_zone'],
20
+ locale: raw_info['locale']
21
+ }
22
+ end
23
+
24
+ extra do
25
+ {
26
+ raw_info: raw_info
27
+ }
28
+ end
29
+
30
+ def raw_info
31
+ @raw_info ||= access_token.get('/api/me.json').parsed
32
+ end
33
+
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,27 @@
1
+ $:.push File.expand_path("../lib", __FILE__)
2
+
3
+ require File.expand_path("../lib/omniauth-yokitup-oauth2/version", __FILE__)
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'omniauth-yokitup-oauth2'
7
+ spec.version = OmniAuth::Yokitup::VERSION
8
+ spec.authors = ['Jonathan VUKOVICH-TRIBOUHARET']
9
+ spec.email = ['jonathan@yokitup.com']
10
+
11
+ spec.summary = "OmniAuth Strategy for Yokitup via OAuth2"
12
+ spec.description = "OmniAuth Strategy for Yokitup via OAuth2"
13
+ spec.homepage = "https://github.com/yokitup/omniauth-yokitup-oauth2"
14
+ spec.license = 'MIT'
15
+
16
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
17
+ `git ls-files -z`.split("\x0")
18
+ end
19
+
20
+ spec.require_paths = ['lib']
21
+
22
+ spec.add_dependency 'omniauth-oauth2', '~> 1.6'
23
+
24
+ spec.add_development_dependency 'bundler'
25
+ spec.add_development_dependency 'rake'
26
+
27
+ end
metadata ADDED
@@ -0,0 +1,95 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: omniauth-yokitup-oauth2
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Jonathan VUKOVICH-TRIBOUHARET
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-07-04 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: omniauth-oauth2
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.6'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.6'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description: OmniAuth Strategy for Yokitup via OAuth2
56
+ email:
57
+ - jonathan@yokitup.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".gitignore"
63
+ - Gemfile
64
+ - LICENSE.md
65
+ - README.md
66
+ - Rakefile
67
+ - lib/omniauth-yokitup-oauth2.rb
68
+ - lib/omniauth-yokitup-oauth2/version.rb
69
+ - lib/omniauth/strategies/yokitup.rb
70
+ - omniauth-yokitup-oauth2.gemspec
71
+ homepage: https://github.com/yokitup/omniauth-yokitup-oauth2
72
+ licenses:
73
+ - MIT
74
+ metadata: {}
75
+ post_install_message:
76
+ rdoc_options: []
77
+ require_paths:
78
+ - lib
79
+ required_ruby_version: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ required_rubygems_version: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ requirements: []
90
+ rubyforge_project:
91
+ rubygems_version: 2.4.5
92
+ signing_key:
93
+ specification_version: 4
94
+ summary: OmniAuth Strategy for Yokitup via OAuth2
95
+ test_files: []