omniauth-ultraauth 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
+ SHA256:
3
+ metadata.gz: ef7ef9265f9e4f0b60dc096f3676a82a9756923ed219bcd8358bcba5649b4b9b
4
+ data.tar.gz: 6172c1b1a6c3d60e61a382df1daee44c2701eb72956d4404252244a3ffb76861
5
+ SHA512:
6
+ metadata.gz: 140c065357b8053446aed35f52ce3b5bd58f476da491b53812e43937c5fdc66ce57023b16f309ce60fce14de273fbd464c1ef3341447b1fcf947d1ffd7bc4f70
7
+ data.tar.gz: 042cbbef9535ee74e7509faa9fa0feb4e67e7522711dcd56a6790f75e77bf7853cacc63290de4d575b6c2db17cb007e172379ee68bc8da38527afdbd7a273cda
data/.gitignore ADDED
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.travis.yml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ sudo: false
3
+ language: ruby
4
+ cache: bundler
5
+ rvm:
6
+ - 2.5.3
7
+ before_install: gem install bundler -v 1.17.3
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in omniauth-ultraauth.gemspec
6
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,101 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ omniauth-ultraauth (0.0.1)
5
+ omniauth_openid_connect (~> 0.2.4)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ activemodel (5.2.2)
11
+ activesupport (= 5.2.2)
12
+ activesupport (5.2.2)
13
+ concurrent-ruby (~> 1.0, >= 1.0.2)
14
+ i18n (>= 0.7, < 2)
15
+ minitest (~> 5.1)
16
+ tzinfo (~> 1.1)
17
+ addressable (2.6.0)
18
+ public_suffix (>= 2.0.2, < 4.0)
19
+ aes_key_wrap (1.0.1)
20
+ attr_required (1.0.1)
21
+ bindata (2.4.4)
22
+ concurrent-ruby (1.1.4)
23
+ diff-lcs (1.3)
24
+ hashie (3.6.0)
25
+ httpclient (2.8.3)
26
+ i18n (1.5.3)
27
+ concurrent-ruby (~> 1.0)
28
+ json-jwt (1.10.0)
29
+ activesupport (>= 4.2)
30
+ aes_key_wrap
31
+ bindata
32
+ mail (2.7.1)
33
+ mini_mime (>= 0.1.1)
34
+ mini_mime (1.0.1)
35
+ minitest (5.11.3)
36
+ omniauth (1.9.0)
37
+ hashie (>= 3.4.6, < 3.7.0)
38
+ rack (>= 1.6.2, < 3)
39
+ omniauth_openid_connect (0.2.4)
40
+ addressable (~> 2.5)
41
+ omniauth (~> 1.3)
42
+ openid_connect (~> 1.1)
43
+ openid_connect (1.1.6)
44
+ activemodel
45
+ attr_required (>= 1.0.0)
46
+ json-jwt (>= 1.5.0)
47
+ rack-oauth2 (>= 1.6.1)
48
+ swd (>= 1.0.0)
49
+ tzinfo
50
+ validate_email
51
+ validate_url
52
+ webfinger (>= 1.0.1)
53
+ public_suffix (3.0.3)
54
+ rack (2.0.6)
55
+ rack-oauth2 (1.9.3)
56
+ activesupport
57
+ attr_required
58
+ httpclient
59
+ json-jwt (>= 1.9.0)
60
+ rack
61
+ rake (10.5.0)
62
+ rspec (3.8.0)
63
+ rspec-core (~> 3.8.0)
64
+ rspec-expectations (~> 3.8.0)
65
+ rspec-mocks (~> 3.8.0)
66
+ rspec-core (3.8.0)
67
+ rspec-support (~> 3.8.0)
68
+ rspec-expectations (3.8.2)
69
+ diff-lcs (>= 1.2.0, < 2.0)
70
+ rspec-support (~> 3.8.0)
71
+ rspec-mocks (3.8.0)
72
+ diff-lcs (>= 1.2.0, < 2.0)
73
+ rspec-support (~> 3.8.0)
74
+ rspec-support (3.8.0)
75
+ swd (1.1.2)
76
+ activesupport (>= 3)
77
+ attr_required (>= 0.0.5)
78
+ httpclient (>= 2.4)
79
+ thread_safe (0.3.6)
80
+ tzinfo (1.2.5)
81
+ thread_safe (~> 0.1)
82
+ validate_email (0.1.6)
83
+ activemodel (>= 3.0)
84
+ mail (>= 2.2.5)
85
+ validate_url (1.0.4)
86
+ activemodel (>= 3.0.0)
87
+ webfinger (1.1.0)
88
+ activesupport
89
+ httpclient (>= 2.4)
90
+
91
+ PLATFORMS
92
+ ruby
93
+
94
+ DEPENDENCIES
95
+ bundler (~> 1.17)
96
+ omniauth-ultraauth!
97
+ rake (~> 10.0)
98
+ rspec (~> 3.0)
99
+
100
+ BUNDLED WITH
101
+ 1.17.3
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2019 Kartikey Tanna
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,78 @@
1
+ # OmniAuth::UltraAuth
2
+
3
+ ## Installation
4
+
5
+ Add the following to Gemfile:
6
+
7
+ gem 'omniauth-ultraauth'
8
+
9
+ Install it using Bundler:
10
+
11
+ $ bundle
12
+
13
+ ## Before You Begin
14
+
15
+ You will require to create an application on https://ultraauth.com
16
+
17
+ 1. Create an account and login to https://ultraauth.com
18
+ 2. Go to "Create an App" and select "Ruby on Rails"
19
+ 3. Click on "Edit Callback URL". The URL should be your host followed by `/auth/ultraauth/callback`. For example, http://localhost:3000/auth/ultraauth/callback
20
+
21
+ ## Usage
22
+
23
+ Example configuration:
24
+
25
+ If you are using Rails, your `config/intializers/omniauth.rb` file should look like this:
26
+ ```ruby
27
+ Rails.application.config.middleware.use OmniAuth::Builder do
28
+ provider :ultraauth, "CLIENT_ID", "CLIENT_SECRET", client_options: {
29
+ redirect_uri: "CALLBACK_URI" # i.e. http://localhost:3000/auth/ultraauth/callback
30
+ }
31
+ end
32
+ ```
33
+
34
+ Replace "CLIENT_ID", "CLIENT_SECRET", "CALLBACK_URI" with the values from the application you created on https://ultraauth.com
35
+
36
+ ## Authentication Hash
37
+
38
+ An example of auth hash returned from the server available under `request.env['omniauth.auth']`:
39
+
40
+ ```
41
+ {
42
+ "provider": "ultraauth",
43
+ "uid": "abcd1234...",
44
+ "info": {
45
+ "name": null,
46
+ "email": null,
47
+ "nickname": null,
48
+ "first_name": null,
49
+ "last_name": null,
50
+ "gender": null,
51
+ "image": null,
52
+ "phone": null,
53
+ "urls": {
54
+ "website": null
55
+ }
56
+ },
57
+ "credentials": {
58
+ "id_token": "abcd1234...",
59
+ "token": "abcd1234...",
60
+ "refresh_token": null,
61
+ "expires_in": 3600,
62
+ "scope": "openid"
63
+ },
64
+ "extra": {
65
+ "raw_info": {
66
+ "sub": "abcd1234...."
67
+ }
68
+ }
69
+ }
70
+ ```
71
+
72
+ ## Contributing
73
+
74
+ 1. Fork it ( http://github.com/ultraauth/omniauth-ultraauth/fork )
75
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
76
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
77
+ 4. Push to the branch (`git push origin my-new-feature`)
78
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "omniauth-ultraauth"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,2 @@
1
+ require 'omniauth-ultraauth/version'
2
+ require 'omniauth/strategies/ultraauth'
@@ -0,0 +1,5 @@
1
+ module OmniAuth
2
+ module UltraAuth
3
+ VERSION = "0.0.1"
4
+ end
5
+ end
@@ -0,0 +1,33 @@
1
+ require 'omniauth'
2
+ require 'omniauth_openid_connect'
3
+
4
+ module OmniAuth
5
+ module Strategies
6
+ class UltraAuth < OmniAuth::Strategies::OpenIDConnect
7
+
8
+ args %i[identifier secret]
9
+
10
+ option :identifier, nil
11
+ option :secret, nil
12
+ option :name, 'ultraauth'
13
+ option :scope, [:openid]
14
+ option :discovery, "true"
15
+ option :response_type, :code
16
+ option :issuer, "https://srv.qryp.to/op"
17
+ option :client_auth_method, :basic
18
+
19
+ info do
20
+ {
21
+ username: user_info.sub
22
+ }
23
+ end
24
+
25
+ private
26
+
27
+ def client_options
28
+ options.client_options.merge!(identifier: options.identifier, secret: options.secret)
29
+ end
30
+ end
31
+ end
32
+ end
33
+ OmniAuth.config.add_camelization('ultraauth', 'UltraAuth')
@@ -0,0 +1,29 @@
1
+
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "omniauth-ultraauth/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "omniauth-ultraauth"
8
+ spec.version = OmniAuth::UltraAuth::VERSION
9
+ spec.authors = ["Kartikey Tanna"]
10
+ spec.email = ["tannakartikey@gmail.com"]
11
+
12
+ spec.summary = %q{Omniauth strategy for UltraAuth.}
13
+ spec.description = %q{Eliminate customer phishing / hijacking and increase user satisfaction with password-less authentication.}
14
+ spec.homepage = "https://ultraauth.com"
15
+ spec.license = "MIT"
16
+
17
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
18
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
19
+ end
20
+ spec.bindir = "exe"
21
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
+ spec.require_paths = ["lib"]
23
+
24
+ spec.add_runtime_dependency "omniauth_openid_connect", "~> 0.2.4"
25
+
26
+ spec.add_development_dependency "bundler", "~> 1.17"
27
+ spec.add_development_dependency "rake", "~> 10.0"
28
+ spec.add_development_dependency "rspec", "~> 3.0"
29
+ end
metadata ADDED
@@ -0,0 +1,115 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: omniauth-ultraauth
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Kartikey Tanna
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2019-03-12 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: omniauth_openid_connect
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 0.2.4
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 0.2.4
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.17'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.17'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '10.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '10.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '3.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '3.0'
69
+ description: Eliminate customer phishing / hijacking and increase user satisfaction
70
+ with password-less authentication.
71
+ email:
72
+ - tannakartikey@gmail.com
73
+ executables: []
74
+ extensions: []
75
+ extra_rdoc_files: []
76
+ files:
77
+ - ".gitignore"
78
+ - ".rspec"
79
+ - ".travis.yml"
80
+ - Gemfile
81
+ - Gemfile.lock
82
+ - LICENSE.txt
83
+ - README.md
84
+ - Rakefile
85
+ - bin/console
86
+ - bin/setup
87
+ - lib/omniauth-ultraauth.rb
88
+ - lib/omniauth-ultraauth/version.rb
89
+ - lib/omniauth/strategies/ultraauth.rb
90
+ - omniauth-ultraauth.gemspec
91
+ homepage: https://ultraauth.com
92
+ licenses:
93
+ - MIT
94
+ metadata: {}
95
+ post_install_message:
96
+ rdoc_options: []
97
+ require_paths:
98
+ - lib
99
+ required_ruby_version: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ required_rubygems_version: !ruby/object:Gem::Requirement
105
+ requirements:
106
+ - - ">="
107
+ - !ruby/object:Gem::Version
108
+ version: '0'
109
+ requirements: []
110
+ rubyforge_project:
111
+ rubygems_version: 2.7.6
112
+ signing_key:
113
+ specification_version: 4
114
+ summary: Omniauth strategy for UltraAuth.
115
+ test_files: []