omniauth-accredify 0.0.7 → 0.0.8
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 +4 -4
- data/.gitignore +17 -0
- data/.rspec +1 -0
- data/Gemfile +12 -0
- data/Guardfile +10 -0
- data/README.md +1 -0
- data/Rakefile +12 -0
- data/lib/omniauth-accredify.rb +2 -0
- data/lib/omniauth-accredify/version.rb +5 -0
- data/lib/omniauth/strategies/accredify.rb +33 -0
- data/omniauth-accredify.gemspec +29 -0
- data/spec/omniauth/strategies/accredify_spec.rb +7 -0
- data/spec/spec_helper.rb +16 -0
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 71cedb436cf0fb2a2376039ff1308c7c6c2b7451
|
4
|
+
data.tar.gz: 919450921cacef9f707f4397782fd057a96bec21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1b71e36e5b588a849dde4f1fbcb26234565f0452aae42b00dd31d0c39733c254355843654776a33a9cc10bcb191fcedf4c4124d0de1a993a32d0994c751aacf
|
7
|
+
data.tar.gz: 8d4c150a9a43fae9cc74e4725cce3a1464b73c5e119b340a6aced92aeacbb93d4e842c1f5519ea8d32427557e473ac96a38ea981f5e9009c1047c37e17707041
|
data/.gitignore
ADDED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--colour
|
data/Gemfile
ADDED
data/Guardfile
ADDED
data/README.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
# Init
|
data/Rakefile
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
require 'omniauth-oauth2'
|
2
|
+
|
3
|
+
module OmniAuth
|
4
|
+
module Strategies
|
5
|
+
class Accredify < OmniAuth::Strategies::OAuth2
|
6
|
+
option :client_options, {
|
7
|
+
:site => 'https://api.accredify.com',
|
8
|
+
:authorize_url => 'https://api.accredify.com/oauth/authorize',
|
9
|
+
:token_url => 'https://api.accredify.com/oauth/token'
|
10
|
+
}
|
11
|
+
|
12
|
+
def request_phase
|
13
|
+
super
|
14
|
+
end
|
15
|
+
|
16
|
+
uid { user_data['id'] }
|
17
|
+
|
18
|
+
info do
|
19
|
+
{
|
20
|
+
'email' => user_data['email'],
|
21
|
+
}
|
22
|
+
end
|
23
|
+
|
24
|
+
def user_data
|
25
|
+
access_token.options[:mode] = :query
|
26
|
+
user_data ||= access_token.get('/api/v1/me.json').parsed
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
OmniAuth.config.add_camelization 'accredify', 'Accredify'
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/omniauth-accredify/version', __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
gem.name = 'omniauth-accredify'
|
6
|
+
gem.version = OmniAuth::Accredify::VERSION
|
7
|
+
gem.authors = ['Peter Martinez']
|
8
|
+
gem.email = ['Peter@Accredify.com']
|
9
|
+
gem.summary = 'Accredify OAuth2 Strategy for OmniAuth'
|
10
|
+
gem.homepage = 'https://github.com/PeterMartinez/omniauth-accredify.git'
|
11
|
+
gem.license = 'MIT'
|
12
|
+
gem.description = %q{OmniAuth strategy for Accredify.}
|
13
|
+
gem.summary = %q{OmniAuth strategy for Accredify.}
|
14
|
+
gem.homepage = "https://api.accredify.com"
|
15
|
+
|
16
|
+
gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
17
|
+
gem.files = `git ls-files`.split("\n")
|
18
|
+
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
19
|
+
gem.name = "omniauth-accredify"
|
20
|
+
gem.require_paths = ["lib"]
|
21
|
+
gem.version = OmniAuth::Accredify::VERSION
|
22
|
+
|
23
|
+
gem.add_dependency 'omniauth', '~> 1.0'
|
24
|
+
gem.add_dependency 'omniauth-oauth2', '~> 1.0'
|
25
|
+
gem.add_development_dependency 'rspec', '~> 2.7'
|
26
|
+
gem.add_development_dependency 'rack-test'
|
27
|
+
gem.add_development_dependency 'simplecov'
|
28
|
+
gem.add_development_dependency 'webmock'
|
29
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
$:.unshift File.expand_path('..', __FILE__)
|
2
|
+
$:.unshift File.expand_path('../../lib', __FILE__)
|
3
|
+
require 'simplecov'
|
4
|
+
SimpleCov.start
|
5
|
+
require 'rspec'
|
6
|
+
require 'rack/test'
|
7
|
+
require 'webmock/rspec'
|
8
|
+
require 'omniauth'
|
9
|
+
require 'omniauth-accredify'
|
10
|
+
|
11
|
+
RSpec.configure do |config|
|
12
|
+
config.include WebMock::API
|
13
|
+
config.include Rack::Test::Methods
|
14
|
+
config.extend OmniAuth::Test::StrategyMacros, :type => :strategy
|
15
|
+
end
|
16
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-accredify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Martinez
|
@@ -100,7 +100,19 @@ email:
|
|
100
100
|
executables: []
|
101
101
|
extensions: []
|
102
102
|
extra_rdoc_files: []
|
103
|
-
files:
|
103
|
+
files:
|
104
|
+
- ".gitignore"
|
105
|
+
- ".rspec"
|
106
|
+
- Gemfile
|
107
|
+
- Guardfile
|
108
|
+
- README.md
|
109
|
+
- Rakefile
|
110
|
+
- lib/omniauth-accredify.rb
|
111
|
+
- lib/omniauth-accredify/version.rb
|
112
|
+
- lib/omniauth/strategies/accredify.rb
|
113
|
+
- omniauth-accredify.gemspec
|
114
|
+
- spec/omniauth/strategies/accredify_spec.rb
|
115
|
+
- spec/spec_helper.rb
|
104
116
|
homepage: https://api.accredify.com
|
105
117
|
licenses:
|
106
118
|
- MIT
|
@@ -125,4 +137,6 @@ rubygems_version: 2.2.2
|
|
125
137
|
signing_key:
|
126
138
|
specification_version: 4
|
127
139
|
summary: OmniAuth strategy for Accredify.
|
128
|
-
test_files:
|
140
|
+
test_files:
|
141
|
+
- spec/omniauth/strategies/accredify_spec.rb
|
142
|
+
- spec/spec_helper.rb
|