omniauth_fresh_account 0.2.5

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
+ SHA256:
3
+ metadata.gz: cfcf6a35cd8fa58aef9b6cd0fba4d02db11b9021b4fdb4b2fc8c8828ceedce13
4
+ data.tar.gz: 0ed6dc281d02b32f024d5baed773012bc1807adc3b88510ae7aa235757d24d1f
5
+ SHA512:
6
+ metadata.gz: 28810592a444967bb942ef06128daf292510a60281f551268d98cf712a7487fd3a038ad20504e776f4db57bb29f35881e530be5f2f5de6b3e5f814bea9b9d2e8
7
+ data.tar.gz: 524000dcdecf91592d0b8241efd0384d43163f35c691571302ea316b2767f6318dd5ebdc8dc7a7bafccf9bf0d87519d6d1c7a0c13892f56d07a022eafb6e48b9
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 2.0.2
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in omniauth_fresh_account.gemspec
4
+ gemspec
data/README.md ADDED
@@ -0,0 +1,33 @@
1
+ # Omniauth::FreshAccount
2
+
3
+ Welcome to the ruby gem that will handle the Oauth2.0 flows with the Fresh Accounts Identity Server, one account for all things Fresh.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'omniauth_fresh_account'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install omniauth_fresh_account
20
+
21
+ ## Usage
22
+
23
+ TODO: Write usage instructions here
24
+
25
+ ## Development
26
+
27
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
28
+
29
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
30
+
31
+ ## Contributing
32
+
33
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/omniauth_fresh_account.
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/fresh_account"
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,40 @@
1
+ require "omniauth/fresh_account/version"
2
+ require 'omniauth-oauth2'
3
+
4
+ module OmniAuth
5
+ module Strategies
6
+ class FreshAccount < OmniAuth::Strategies::OAuth2
7
+ # change the class name and the :name option to match your application name
8
+ option :name, :fresh_account
9
+
10
+ option :client_options, {
11
+ :site => "http://localhost:5000",
12
+ :authorize_url => "/oauth/authorize"
13
+ }
14
+
15
+ uid { raw_info["id"] }
16
+
17
+ info do
18
+ {
19
+ :email => raw_info["email"],
20
+ :name => raw_info["name"],
21
+ :avatar_url => raw_info["avatar_url"]
22
+ # and anything else you want to return to your API consumers
23
+ }
24
+ end
25
+
26
+ extra do
27
+ skip_info? ? {} : { :raw_info => raw_info }
28
+ end
29
+
30
+ def raw_info
31
+ @raw_info ||= access_token.get('/api/v1/me.json').parsed
32
+ end
33
+
34
+ # https://github.com/intridea/omniauth-oauth2/issues/81
35
+ def callback_url
36
+ full_host + script_name + callback_path
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,5 @@
1
+ module Omniauth
2
+ module FreshAccount
3
+ VERSION = "0.2.5"
4
+ end
5
+ end
Binary file
@@ -0,0 +1,35 @@
1
+ lib = File.expand_path("lib", __dir__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+ require "omniauth/fresh_account/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "omniauth_fresh_account"
7
+ spec.version = Omniauth::FreshAccount::VERSION
8
+ spec.authors = ["Kudakwashe Paradzayi"]
9
+ spec.email = ["kgparadzayi@gmail.com"]
10
+
11
+ spec.summary = %q{ Handles authentication process for Fresh Account }
12
+ spec.description = %q{ The Authentication Gem for Fresh Account }
13
+ spec.homepage = "https://github.com/kudapara/omniauth_fresh_account"
14
+
15
+ spec.metadata["allowed_push_host"] = "https://rubygems.org"
16
+
17
+ spec.metadata["homepage_uri"] = spec.homepage
18
+ spec.metadata["source_code_uri"] = "https://github.com/kudapara/omniauth_fresh_account"
19
+ spec.metadata["changelog_uri"] = "https://github.com/kudapara/omniauth_fresh_account/tree/master/CHANGELOG.md"
20
+
21
+ # Specify which files should be added to the gem when it is released.
22
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
23
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
24
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
25
+ end
26
+ spec.bindir = "exe"
27
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
+ spec.require_paths = ["lib"]
29
+
30
+ spec.add_dependency "omniauth-oauth2", "~> 1.7"
31
+
32
+ spec.add_development_dependency "bundler", "~> 2.0"
33
+ spec.add_development_dependency "rake", "~> 10.0"
34
+ spec.add_development_dependency "rspec", "~> 3.0"
35
+ end
metadata ADDED
@@ -0,0 +1,114 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: omniauth_fresh_account
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.5
5
+ platform: ruby
6
+ authors:
7
+ - Kudakwashe Paradzayi
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2021-04-10 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.7'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.7'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '2.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '2.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: '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: " The Authentication Gem for Fresh Account "
70
+ email:
71
+ - kgparadzayi@gmail.com
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - ".gitignore"
77
+ - ".rspec"
78
+ - ".travis.yml"
79
+ - Gemfile
80
+ - README.md
81
+ - Rakefile
82
+ - bin/console
83
+ - bin/setup
84
+ - lib/omniauth/fresh_account.rb
85
+ - lib/omniauth/fresh_account/version.rb
86
+ - omniauth-progic_id-0.1.5.gem
87
+ - omniauth_fresh_account.gemspec
88
+ homepage: https://github.com/kudapara/omniauth_fresh_account
89
+ licenses: []
90
+ metadata:
91
+ allowed_push_host: https://rubygems.org
92
+ homepage_uri: https://github.com/kudapara/omniauth_fresh_account
93
+ source_code_uri: https://github.com/kudapara/omniauth_fresh_account
94
+ changelog_uri: https://github.com/kudapara/omniauth_fresh_account/tree/master/CHANGELOG.md
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
+ rubygems_version: 3.1.2
111
+ signing_key:
112
+ specification_version: 4
113
+ summary: Handles authentication process for Fresh Account
114
+ test_files: []