omniauth-rezli 2.2.2

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: e852a42f1502235e88ebd826cf210518a5b2c7ae
4
+ data.tar.gz: 81921ffd60ce663a6508af85b1a947bab46b9993
5
+ SHA512:
6
+ metadata.gz: 36f1524e4cce9f6b23b73c1327bd0cac40b5da6fe53a6fd6accd9a086514bffccb55b3c4e346de18350bfd5b1ce729924cfd6ae95b1e61c203188f017c8fc224
7
+ data.tar.gz: 9755286b29c33bd709f619d7bb3e0847fba3f04c78cba0010ba3b043effd8b68e53e90c2c3117cce435cca5523816a23470f71f4aaadf78528bbfc374cdd8066
@@ -0,0 +1,9 @@
1
+ *.gem
2
+ .bundle
3
+ .rspec
4
+ /Gemfile.lock
5
+ pkg/*
6
+ .powenv
7
+ tmp
8
+ bin
9
+ example/app.log
@@ -0,0 +1,16 @@
1
+ before_install:
2
+ - gem update bundler
3
+ - bundle --version
4
+ - gem update --system 2.1.11
5
+ - gem --version
6
+ rvm:
7
+ - 1.8.7
8
+ - 1.9.2
9
+ - 1.9.3
10
+ - 2.0.0
11
+ - 2.1
12
+ - jruby
13
+ - rbx
14
+ matrix:
15
+ allow_failures:
16
+ - rvm: rbx
data/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ platforms :rbx do
6
+ gem 'rubysl', '~> 2.0'
7
+ end
data/LICENSE ADDED
@@ -0,0 +1,7 @@
1
+ Copyright (c) 2016 Rezli
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,47 @@
1
+ # OmniAuth Rezli  [![Build Status](https://secure.travis-ci.org/irongaming/omniauth-rezli.png?branch=master)](https://travis-ci.org/irongaming/omniauth-rezli)
2
+
3
+ **These notes are based on master, please see tags for README pertaining to specific releases.**
4
+
5
+ Rezli OAuth2 Strategy for OmniAuth.
6
+
7
+ Supports the OAuth 2.0 server-side and client-side flows.
8
+
9
+ ## Installing
10
+
11
+ Add to your `Gemfile`:
12
+
13
+ ```ruby
14
+ gem 'omniauth-rezli'
15
+ ```
16
+
17
+ Then `bundle install`.
18
+
19
+ ## Usage
20
+
21
+ `OmniAuth::Strategies::Rezli` is simply a Rack middleware. Read the OmniAuth docs for detailed instructions: https://github.com/intridea/omniauth.
22
+
23
+ Here's a quick example, adding the middleware to a Rails app in `config/initializers/omniauth.rb`:
24
+
25
+ ```ruby
26
+ Rails.application.config.middleware.use OmniAuth::Builder do
27
+ provider :rezli, ENV['REZLI_KEY'], ENV['REZLI_SECRET']
28
+ end
29
+ ```
30
+
31
+ ## Auth Hash
32
+
33
+ `request.env['omniauth.auth']` contains the response *Auth Hash* from Rezli.
34
+
35
+ ## Supported Rubies
36
+
37
+ Actively tested with the following Ruby versions:
38
+
39
+ - MRI 2.1.0
40
+ - MRI 2.0.0
41
+ - MRI 1.9.3
42
+ - MRI 1.9.2
43
+ - MRI 1.8.7
44
+ - JRuby 1.7.9
45
+ - Rubinius (latest stable)
46
+
47
+ [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/Rezli/omniauth-Rezli/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
@@ -0,0 +1,8 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rake/testtask'
3
+
4
+ Rake::TestTask.new do |task|
5
+ task.libs << 'test'
6
+ end
7
+
8
+ task :default => :test
@@ -0,0 +1 @@
1
+ require 'omniauth/rezli'
@@ -0,0 +1,2 @@
1
+ require 'omniauth/rezli/version'
2
+ require 'omniauth/strategies/rezli'
@@ -0,0 +1,5 @@
1
+ module OmniAuth
2
+ module Rezli
3
+ VERSION = "2.2.2"
4
+ end
5
+ end
@@ -0,0 +1,42 @@
1
+ require 'omniauth/strategies/oauth2'
2
+
3
+ module OmniAuth
4
+ module Strategies
5
+ class Rezli < OmniAuth::Strategies::OAuth2
6
+ option :name, :rezli
7
+
8
+ option :client_options, {
9
+ :site => "https://www.rezli.com",
10
+ :authorize_url => "/oauth2/authorize",
11
+ :token_url => "/oauth2/token",
12
+ }
13
+
14
+ uid { raw_info["id"] }
15
+
16
+ info do
17
+ prune!({
18
+ 'verified_email' => raw_info['email'],
19
+ })
20
+ end
21
+
22
+ extra do
23
+ hash = {}
24
+ hash['raw_info'] = raw_info unless skip_info?
25
+ prune! hash
26
+ end
27
+
28
+ def raw_info
29
+ @raw_info ||= access_token.get('/api/me.json').parsed
30
+ end
31
+
32
+ private
33
+
34
+ def prune!(hash)
35
+ hash.delete_if do |_, value|
36
+ prune!(value) if value.is_a?(Hash)
37
+ value.nil? || (value.respond_to?(:empty?) && value.empty?)
38
+ end
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,24 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path('../lib', __FILE__)
3
+ require 'omniauth/rezli/version'
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = 'omniauth-rezli'
7
+ s.version = OmniAuth::Rezli::VERSION
8
+ s.authors = ['Rezli']
9
+ s.email = ['development@rezli.com']
10
+ s.summary = 'Rezli OAuth2 Strategy for OmniAuth'
11
+ s.homepage = 'https://github.com/irongaming/omniauth-rezli'
12
+ s.license = 'MIT'
13
+
14
+ s.files = `git ls-files`.split("\n")
15
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
16
+ s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
17
+ s.require_paths = ['lib']
18
+
19
+ s.add_runtime_dependency 'omniauth-oauth2', '~> 1.2'
20
+
21
+ s.add_development_dependency 'minitest'
22
+ s.add_development_dependency 'mocha'
23
+ s.add_development_dependency 'rake'
24
+ end
metadata ADDED
@@ -0,0 +1,111 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: omniauth-rezli
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.2.2
5
+ platform: ruby
6
+ authors:
7
+ - Rezli
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-02-19 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.2'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1.2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: minitest
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: mocha
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
+ - !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:
70
+ email:
71
+ - development@rezli.com
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - .gitignore
77
+ - .travis.yml
78
+ - Gemfile
79
+ - LICENSE
80
+ - README.md
81
+ - Rakefile
82
+ - lib/omniauth-rezli.rb
83
+ - lib/omniauth/rezli.rb
84
+ - lib/omniauth/rezli/version.rb
85
+ - lib/omniauth/strategies/rezli.rb
86
+ - omniauth-rezli.gemspec
87
+ homepage: https://github.com/irongaming/omniauth-rezli
88
+ licenses:
89
+ - MIT
90
+ metadata: {}
91
+ post_install_message:
92
+ rdoc_options: []
93
+ require_paths:
94
+ - lib
95
+ required_ruby_version: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - '>='
98
+ - !ruby/object:Gem::Version
99
+ version: '0'
100
+ required_rubygems_version: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - '>='
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
105
+ requirements: []
106
+ rubyforge_project:
107
+ rubygems_version: 2.0.14
108
+ signing_key:
109
+ specification_version: 4
110
+ summary: Rezli OAuth2 Strategy for OmniAuth
111
+ test_files: []