pax_global_header00006660000000000000000000000064135250130310014503gustar00rootroot0000000000000052 comment=173d570272223c223afc4ec46b227685066dd729 ruby-omniauth-ultraauth-0.0.2/000077500000000000000000000000001352501303100163145ustar00rootroot00000000000000ruby-omniauth-ultraauth-0.0.2/.gitignore000066400000000000000000000001611352501303100203020ustar00rootroot00000000000000/.bundle/ /.yardoc /_yardoc/ /coverage/ /doc/ /pkg/ /spec/reports/ /tmp/ # rspec failure tracking .rspec_status ruby-omniauth-ultraauth-0.0.2/.rspec000066400000000000000000000000651352501303100174320ustar00rootroot00000000000000--format documentation --color --require spec_helper ruby-omniauth-ultraauth-0.0.2/.travis.yml000066400000000000000000000001531352501303100204240ustar00rootroot00000000000000--- sudo: false language: ruby cache: bundler rvm: - 2.5.3 before_install: gem install bundler -v 1.17.3 ruby-omniauth-ultraauth-0.0.2/Gemfile000066400000000000000000000002551352501303100176110ustar00rootroot00000000000000source "https://rubygems.org" git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } # Specify your gem's dependencies in omniauth-ultraauth.gemspec gemspec ruby-omniauth-ultraauth-0.0.2/Gemfile.lock000066400000000000000000000043251352501303100205420ustar00rootroot00000000000000PATH 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 ruby-omniauth-ultraauth-0.0.2/LICENSE.txt000066400000000000000000000020711352501303100201370ustar00rootroot00000000000000The 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. ruby-omniauth-ultraauth-0.0.2/README.md000066400000000000000000000036041352501303100175760ustar00rootroot00000000000000# 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 ruby-omniauth-ultraauth-0.0.2/Rakefile000066400000000000000000000001651352501303100177630ustar00rootroot00000000000000require "bundler/gem_tasks" require "rspec/core/rake_task" RSpec::Core::RakeTask.new(:spec) task :default => :spec ruby-omniauth-ultraauth-0.0.2/bin/000077500000000000000000000000001352501303100170645ustar00rootroot00000000000000ruby-omniauth-ultraauth-0.0.2/bin/console000077500000000000000000000005411352501303100204540ustar00rootroot00000000000000#!/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__) ruby-omniauth-ultraauth-0.0.2/bin/setup000077500000000000000000000002031352501303100201450ustar00rootroot00000000000000#!/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 ruby-omniauth-ultraauth-0.0.2/lib/000077500000000000000000000000001352501303100170625ustar00rootroot00000000000000ruby-omniauth-ultraauth-0.0.2/lib/omniauth-ultraauth.rb000066400000000000000000000001151352501303100232370ustar00rootroot00000000000000require 'omniauth-ultraauth/version' require 'omniauth/strategies/ultraauth' ruby-omniauth-ultraauth-0.0.2/lib/omniauth-ultraauth/000077500000000000000000000000001352501303100227155ustar00rootroot00000000000000ruby-omniauth-ultraauth-0.0.2/lib/omniauth-ultraauth/version.rb000066400000000000000000000001031352501303100247210ustar00rootroot00000000000000module OmniAuth module UltraAuth VERSION = "0.0.2" end end ruby-omniauth-ultraauth-0.0.2/lib/omniauth/000077500000000000000000000000001352501303100207065ustar00rootroot00000000000000ruby-omniauth-ultraauth-0.0.2/lib/omniauth/strategies/000077500000000000000000000000001352501303100230605ustar00rootroot00000000000000ruby-omniauth-ultraauth-0.0.2/lib/omniauth/strategies/ultraauth.rb000066400000000000000000000013541352501303100254210ustar00rootroot00000000000000require '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') ruby-omniauth-ultraauth-0.0.2/omniauth-ultraauth.gemspec000066400000000000000000000022111352501303100235100ustar00rootroot00000000000000 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