omniauth-parallelmarkets 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +0 -5
- data/README.md +53 -6
- data/lib/omniauth-parallelmarkets/version.rb +1 -1
- data/omniauth-parallelmarkets.gemspec +1 -0
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7166cbae827f2026708ac8741e85854d7fa1ff9c59caa2a00aa5e0b35c446c99
|
4
|
+
data.tar.gz: 50251a786f801151e1c9af9e2075f81fe95c3c11bc40659f96b6e0dea175c048
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 140cf4c00681023721333acf5c8170760f58be0449aa36aa6ec2eaddddbb0102bc5d2f2b10edef1de5ba6fd7d85866a20f39e6006cc6408a23eea666b438fbbc
|
7
|
+
data.tar.gz: 5fe6b709dd389f0269464388e7422b83d2dda3945077752a2a3266a66ead7bc1137392e62cbb5a0388831822ea080abf5f985443bd2e3f12059ba46b591a86d0
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,25 +1,72 @@
|
|
1
|
+
[![Gem Version](https://badge.fury.io/rb/omniauth-parallelmarkets.svg)](https://badge.fury.io/rb/omniauth-parallelmarkets)
|
2
|
+
[![Build Status](https://travis-ci.org/parallel-markets/omniauth-parallelmarkets.svg?branch=master)](https://travis-ci.org/parallel-markets/omniauth-parallelmarkets)
|
3
|
+
|
1
4
|
# OmniAuth ParallelMarkets
|
2
5
|
|
3
6
|
This gem contains the [Parallel Markets](https://parallelmarkets.com) strategy for OmniAuth.
|
4
7
|
|
5
8
|
ParallelMarkets uses the OAuth2 flow, you can read about at [docs.parallelmarkets.com/api](https://docs.parallelmarkets.com/api/).
|
6
9
|
|
7
|
-
##
|
10
|
+
## Installation
|
8
11
|
|
9
|
-
|
12
|
+
Add this line to your application's Gemfile:
|
10
13
|
|
11
14
|
```ruby
|
12
15
|
gem 'omniauth-parallelmarkets'
|
13
16
|
```
|
14
17
|
|
15
|
-
|
18
|
+
And then execute:
|
19
|
+
|
20
|
+
$ bundle
|
21
|
+
|
22
|
+
Or install it yourself as:
|
23
|
+
|
24
|
+
$ gem install omniauth-parallelmarkets
|
25
|
+
|
26
|
+
## Usage
|
16
27
|
|
28
|
+
You'll need to register your application with [Parallel Markets Support](mailto:help@parallelmarkets.com) and get `client_id` & `client_secret`.
|
29
|
+
|
30
|
+
Here's an example for adding the middleware to a Rails app in config/initializers/omniauth.rb:
|
17
31
|
```ruby
|
18
32
|
Rails.application.config.middleware.use OmniAuth::Builder do
|
19
|
-
|
33
|
+
provider :parallelmarkets, ENV["CLIENT_ID"], ENV["CLIENT_SECRET"]
|
20
34
|
end
|
21
35
|
```
|
22
36
|
|
23
|
-
|
37
|
+
See the documentation for [OmniAuth](https://github.com/omniauth/omniauth) for more information on usage.
|
38
|
+
|
39
|
+
## Sample Auth Hash
|
40
|
+
```ruby
|
41
|
+
{
|
42
|
+
"provider"=>"parallelmarkets",
|
43
|
+
"uid"=>"123456",
|
44
|
+
"info"=> {
|
45
|
+
"name"=>"Snake Plissken",
|
46
|
+
"email"=>"snake@example.com",
|
47
|
+
"first_name"=>"Snake"
|
48
|
+
"last_name"=>"Plissken"
|
49
|
+
},
|
50
|
+
"credentials"=> {
|
51
|
+
"token"=>"parallel_access_token",
|
52
|
+
"refresh_token"=>"parallel_refresh_token",
|
53
|
+
"expires_at"=>1451681914,
|
54
|
+
"expires"=>true
|
55
|
+
},
|
56
|
+
"extra"=> {
|
57
|
+
"accreditations"=>[
|
58
|
+
{
|
59
|
+
"id"=>321,
|
60
|
+
"status"=>"current",
|
61
|
+
"expires_at"=>1565317542,
|
62
|
+
"assertion_type"=>"income",
|
63
|
+
"created_at"=>1565307542
|
64
|
+
}
|
65
|
+
]
|
66
|
+
}
|
67
|
+
}
|
68
|
+
```
|
69
|
+
|
70
|
+
## License
|
24
71
|
|
25
|
-
|
72
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
@@ -18,6 +18,7 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.require_paths = ['lib']
|
19
19
|
|
20
20
|
s.add_runtime_dependency 'omniauth-oauth2', '~> 1.2'
|
21
|
+
s.add_development_dependency 'rake', '~> 12.0'
|
21
22
|
s.add_development_dependency 'rspec', '~> 3.5'
|
22
23
|
s.add_development_dependency 'rubocop'
|
23
24
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-parallelmarkets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Muller
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.2'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '12.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '12.0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: rspec
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|