diff --git a/debian/gems-compat/omniauth-ultraauth-0.0.2/.gitignore b/debian/gems-compat/omniauth-ultraauth-0.0.2/.gitignore new file mode 100644 index 0000000000..b04a8c840d --- /dev/null +++ b/debian/gems-compat/omniauth-ultraauth-0.0.2/.gitignore @@ -0,0 +1,11 @@ +/.bundle/ +/.yardoc +/_yardoc/ +/coverage/ +/doc/ +/pkg/ +/spec/reports/ +/tmp/ + +# rspec failure tracking +.rspec_status diff --git a/debian/gems-compat/omniauth-ultraauth-0.0.2/.rspec b/debian/gems-compat/omniauth-ultraauth-0.0.2/.rspec new file mode 100644 index 0000000000..34c5164d9b --- /dev/null +++ b/debian/gems-compat/omniauth-ultraauth-0.0.2/.rspec @@ -0,0 +1,3 @@ +--format documentation +--color +--require spec_helper diff --git a/debian/gems-compat/omniauth-ultraauth-0.0.2/.travis.yml b/debian/gems-compat/omniauth-ultraauth-0.0.2/.travis.yml new file mode 100644 index 0000000000..88064d455a --- /dev/null +++ b/debian/gems-compat/omniauth-ultraauth-0.0.2/.travis.yml @@ -0,0 +1,7 @@ +--- +sudo: false +language: ruby +cache: bundler +rvm: + - 2.5.3 +before_install: gem install bundler -v 1.17.3 diff --git a/debian/gems-compat/omniauth-ultraauth-0.0.2/Gemfile b/debian/gems-compat/omniauth-ultraauth-0.0.2/Gemfile new file mode 100644 index 0000000000..f6557662eb --- /dev/null +++ b/debian/gems-compat/omniauth-ultraauth-0.0.2/Gemfile @@ -0,0 +1,6 @@ +source "https://rubygems.org" + +git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } + +# Specify your gem's dependencies in omniauth-ultraauth.gemspec +gemspec diff --git a/debian/gems-compat/omniauth-ultraauth-0.0.2/Gemfile.lock b/debian/gems-compat/omniauth-ultraauth-0.0.2/Gemfile.lock new file mode 100644 index 0000000000..190d11a04b --- /dev/null +++ b/debian/gems-compat/omniauth-ultraauth-0.0.2/Gemfile.lock @@ -0,0 +1,101 @@ +PATH + remote: . + specs: + omniauth-ultraauth (0.0.1) + omniauth_openid_connect (~> 0.3.0) + +GEM + remote: https://rubygems.org/ + specs: + activemodel (5.2.2) + activesupport (= 5.2.2) + activesupport (5.2.2) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 0.7, < 2) + minitest (~> 5.1) + tzinfo (~> 1.1) + addressable (2.6.0) + public_suffix (>= 2.0.2, < 4.0) + aes_key_wrap (1.0.1) + attr_required (1.0.1) + bindata (2.4.4) + concurrent-ruby (1.1.4) + diff-lcs (1.3) + hashie (3.6.0) + httpclient (2.8.3) + i18n (1.5.3) + concurrent-ruby (~> 1.0) + json-jwt (1.10.0) + activesupport (>= 4.2) + aes_key_wrap + bindata + mail (2.7.1) + mini_mime (>= 0.1.1) + mini_mime (1.0.1) + minitest (5.11.3) + omniauth (1.9.0) + hashie (>= 3.4.6, < 3.7.0) + rack (>= 1.6.2, < 3) + omniauth_openid_connect (0.3.0) + addressable (~> 2.5) + omniauth (~> 1.3) + openid_connect (~> 1.1) + openid_connect (1.1.6) + activemodel + attr_required (>= 1.0.0) + json-jwt (>= 1.5.0) + rack-oauth2 (>= 1.6.1) + swd (>= 1.0.0) + tzinfo + validate_email + validate_url + webfinger (>= 1.0.1) + public_suffix (3.0.3) + rack (2.0.6) + rack-oauth2 (1.9.3) + activesupport + attr_required + httpclient + json-jwt (>= 1.9.0) + rack + rake (10.5.0) + rspec (3.8.0) + rspec-core (~> 3.8.0) + rspec-expectations (~> 3.8.0) + rspec-mocks (~> 3.8.0) + rspec-core (3.8.0) + rspec-support (~> 3.8.0) + rspec-expectations (3.8.2) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.8.0) + rspec-mocks (3.8.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.8.0) + rspec-support (3.8.0) + swd (1.1.2) + activesupport (>= 3) + attr_required (>= 0.0.5) + httpclient (>= 2.4) + thread_safe (0.3.6) + tzinfo (1.2.5) + thread_safe (~> 0.1) + validate_email (0.1.6) + activemodel (>= 3.0) + mail (>= 2.2.5) + validate_url (1.0.4) + activemodel (>= 3.0.0) + webfinger (1.1.0) + activesupport + httpclient (>= 2.4) + +PLATFORMS + ruby + +DEPENDENCIES + bundler (~> 1.17) + omniauth-ultraauth! + rake (~> 10.0) + rspec (~> 3.0) + +BUNDLED WITH + 1.17.3 diff --git a/debian/gems-compat/omniauth-ultraauth-0.0.2/LICENSE.txt b/debian/gems-compat/omniauth-ultraauth-0.0.2/LICENSE.txt new file mode 100644 index 0000000000..d0d77fdc43 --- /dev/null +++ b/debian/gems-compat/omniauth-ultraauth-0.0.2/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2019 Kartikey Tanna + +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: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +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. diff --git a/debian/gems-compat/omniauth-ultraauth-0.0.2/README.md b/debian/gems-compat/omniauth-ultraauth-0.0.2/README.md new file mode 100644 index 0000000000..eed2a68ead --- /dev/null +++ b/debian/gems-compat/omniauth-ultraauth-0.0.2/README.md @@ -0,0 +1,78 @@ +# OmniAuth::UltraAuth + +## Installation + +Add the following to Gemfile: + + gem 'omniauth-ultraauth' + +Install it using Bundler: + + $ bundle + +## Before You Begin + +You will require to create an application on https://ultraauth.com + +1. Create an account and login to https://ultraauth.com +2. Go to "Create an App" and select "Ruby on Rails" +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 + +## Usage + +Example configuration: + +If you are using Rails, your `config/intializers/omniauth.rb` file should look like this: +```ruby +Rails.application.config.middleware.use OmniAuth::Builder do + provider :ultraauth, "CLIENT_ID", "CLIENT_SECRET", client_options: { + redirect_uri: "CALLBACK_URI" # i.e. http://localhost:3000/auth/ultraauth/callback + } +end +``` + +Replace "CLIENT_ID", "CLIENT_SECRET", "CALLBACK_URI" with the values from the application you created on https://ultraauth.com + +## Authentication Hash + +An example of auth hash returned from the server available under `request.env['omniauth.auth']`: + +``` + { + "provider": "ultraauth", + "uid": "abcd1234...", + "info": { + "name": null, + "email": null, + "nickname": null, + "first_name": null, + "last_name": null, + "gender": null, + "image": null, + "phone": null, + "urls": { + "website": null + } + }, + "credentials": { + "id_token": "abcd1234...", + "token": "abcd1234...", + "refresh_token": null, + "expires_in": 3600, + "scope": "openid" + }, + "extra": { + "raw_info": { + "sub": "abcd1234...." + } + } +} +``` + +## Contributing + +1. Fork it ( http://github.com/ultraauth/omniauth-ultraauth/fork ) +2. Create your feature branch (`git checkout -b my-new-feature`) +3. Commit your changes (`git commit -am 'Add some feature'`) +4. Push to the branch (`git push origin my-new-feature`) +5. Create new Pull Request diff --git a/debian/gems-compat/omniauth-ultraauth-0.0.2/Rakefile b/debian/gems-compat/omniauth-ultraauth-0.0.2/Rakefile new file mode 100644 index 0000000000..b7e9ed549b --- /dev/null +++ b/debian/gems-compat/omniauth-ultraauth-0.0.2/Rakefile @@ -0,0 +1,6 @@ +require "bundler/gem_tasks" +require "rspec/core/rake_task" + +RSpec::Core::RakeTask.new(:spec) + +task :default => :spec diff --git a/debian/gems-compat/omniauth-ultraauth-0.0.2/bin/console b/debian/gems-compat/omniauth-ultraauth-0.0.2/bin/console new file mode 100755 index 0000000000..5800b8f4ae --- /dev/null +++ b/debian/gems-compat/omniauth-ultraauth-0.0.2/bin/console @@ -0,0 +1,14 @@ +#!/usr/bin/env ruby + +require "bundler/setup" +require "omniauth-ultraauth" + +# You can add fixtures and/or initialization code here to make experimenting +# with your gem easier. You can also use a different console, if you like. + +# (If you use this, don't forget to add pry to your Gemfile!) +# require "pry" +# Pry.start + +require "irb" +IRB.start(__FILE__) diff --git a/debian/gems-compat/omniauth-ultraauth-0.0.2/bin/setup b/debian/gems-compat/omniauth-ultraauth-0.0.2/bin/setup new file mode 100755 index 0000000000..dce67d860a --- /dev/null +++ b/debian/gems-compat/omniauth-ultraauth-0.0.2/bin/setup @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +set -euo pipefail +IFS=$'\n\t' +set -vx + +bundle install + +# Do any other automated setup that you need to do here diff --git a/debian/gems-compat/omniauth-ultraauth-0.0.2/lib/omniauth-ultraauth.rb b/debian/gems-compat/omniauth-ultraauth-0.0.2/lib/omniauth-ultraauth.rb new file mode 100644 index 0000000000..30ebea9832 --- /dev/null +++ b/debian/gems-compat/omniauth-ultraauth-0.0.2/lib/omniauth-ultraauth.rb @@ -0,0 +1,2 @@ +require 'omniauth-ultraauth/version' +require 'omniauth/strategies/ultraauth' diff --git a/debian/gems-compat/omniauth-ultraauth-0.0.2/lib/omniauth-ultraauth/version.rb b/debian/gems-compat/omniauth-ultraauth-0.0.2/lib/omniauth-ultraauth/version.rb new file mode 100644 index 0000000000..33c5edf5d4 --- /dev/null +++ b/debian/gems-compat/omniauth-ultraauth-0.0.2/lib/omniauth-ultraauth/version.rb @@ -0,0 +1,5 @@ +module OmniAuth + module UltraAuth + VERSION = "0.0.2" + end +end diff --git a/debian/gems-compat/omniauth-ultraauth-0.0.2/lib/omniauth/strategies/ultraauth.rb b/debian/gems-compat/omniauth-ultraauth-0.0.2/lib/omniauth/strategies/ultraauth.rb new file mode 100644 index 0000000000..be6a115096 --- /dev/null +++ b/debian/gems-compat/omniauth-ultraauth-0.0.2/lib/omniauth/strategies/ultraauth.rb @@ -0,0 +1,33 @@ +require 'omniauth' +require 'omniauth_openid_connect' + +module OmniAuth + module Strategies + class UltraAuth < OmniAuth::Strategies::OpenIDConnect + + args %i[identifier secret] + + option :identifier, nil + option :secret, nil + option :name, 'ultraauth' + option :scope, [:openid] + option :discovery, "true" + option :response_type, :code + option :issuer, "https://srv.qryp.to/op" + option :client_auth_method, :basic + + info do + { + username: uid + } + end + + private + + def client_options + options.client_options.merge!(identifier: options.identifier, secret: options.secret) + end + end + end +end +OmniAuth.config.add_camelization('ultraauth', 'UltraAuth') diff --git a/debian/gems-compat/omniauth-ultraauth-0.0.2/omniauth-ultraauth.gemspec b/debian/gems-compat/omniauth-ultraauth-0.0.2/omniauth-ultraauth.gemspec new file mode 100644 index 0000000000..0db52c19d5 --- /dev/null +++ b/debian/gems-compat/omniauth-ultraauth-0.0.2/omniauth-ultraauth.gemspec @@ -0,0 +1,29 @@ + +lib = File.expand_path("../lib", __FILE__) +$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) +require "omniauth-ultraauth/version" + +Gem::Specification.new do |spec| + spec.name = "omniauth-ultraauth" + spec.version = OmniAuth::UltraAuth::VERSION + spec.authors = ["Kartikey Tanna"] + spec.email = ["tannakartikey@gmail.com"] + + spec.summary = %q{Omniauth strategy for UltraAuth.} + spec.description = %q{Eliminate customer phishing / hijacking and increase user satisfaction with password-less authentication.} + spec.homepage = "https://ultraauth.com" + spec.license = "MIT" + + spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do + `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } + end + spec.bindir = "exe" + spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } + spec.require_paths = ["lib"] + + spec.add_runtime_dependency "omniauth_openid_connect", "~> 0.3.0" + + spec.add_development_dependency "bundler", "~> 1.17" + spec.add_development_dependency "rake", "~> 10.0" + spec.add_development_dependency "rspec", "~> 3.0" +end diff --git a/debian/patches/0800-embed-omniauth0ultraauth.patch b/debian/patches/0800-embed-omniauth0ultraauth.patch new file mode 100644 index 0000000000..23c0676dec --- /dev/null +++ b/debian/patches/0800-embed-omniauth0ultraauth.patch @@ -0,0 +1,11 @@ +--- a/Gemfile ++++ b/Gemfile +@@ -53,7 +53,7 @@ + gem 'omniauth_crowd', '~> 2.2' + gem 'omniauth-authentiq', '~> 0.3.3' + gem 'omniauth_openid_connect', '~> 0.3.0' +-gem "omniauth-ultraauth", '~> 0.0.2' ++gem "omniauth-ultraauth", '~> 0.0.2', path: 'vendor/gems/omniauth-ultraauth-0.0.2' + gem 'omniauth-salesforce', '~> 1.0', '>= 1.0.5' + gem 'rack-oauth2', '~> 1.9', '>= 1.9.3' + gem 'jwt', '2.1', path: 'vendor/gems/jwt-2.1.0' diff --git a/debian/patches/series b/debian/patches/series index 316c0249e9..22186581a0 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -29,3 +29,4 @@ 0730-install-graphql-tag.patch 0740-use-packaged-modules.patch bump-devise-to-4-6.patch +0800-embed-omniauth0ultraauth.patch