omniauth-myvr 0.1.7 → 1.0.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 657582c413b288e3234f557fae4245ccad97aae3
4
- data.tar.gz: c7a81d16ea3634ffaf4a3c8190e72faa00714c63
3
+ metadata.gz: 5b30440966b59a3731c49d432fb477cd758ecfed
4
+ data.tar.gz: d2ee806725b8872642d0f2b980fe68c99b0b5b0a
5
5
  SHA512:
6
- metadata.gz: dd0fdb6fb8c5d3936defd436783bc432323e750a389fd2f3a8e9f80c41022e5bfbb49de94f41bad7df572324975867feebf39a99fc289e48159ee0552067c7cd
7
- data.tar.gz: 21a9a3453f7fe38a4d2f5f41aedde44e8fda4cd04037a4e1ccb60414a1db9fefbd7c7ca0c74a14b0a573b0459dcf5140c6ce13697d377dee379c9a272b51dcc8
6
+ metadata.gz: 675bab1c18910bf6361755ac5236c88dd533d8c4227b8235d58ea7b92c3eb7afd04226e7ea3af10695a92cf6fc7b5b6fe9590f5fc3f67fcbf28822537cce87e8
7
+ data.tar.gz: 9875c299039696dc912cd127924b41f9addeeb8f90a89fdbf4a60e264032ac428e735825311d8ab121a3e0ff5505045f66aa241ebda9d594bc26838accd057dd
data/README.md CHANGED
@@ -6,4 +6,7 @@ gem 'omniauth'
6
6
  gem 'omniauth-myvr'
7
7
  ```
8
8
 
9
+ ## Examples:
9
10
 
11
+ + Custom Auth: https://github.com/w1zeman1p/myvr-connect-demo
12
+ + Used with Devise: https://github.com/w1zeman1p/myvr-connect-devise-demo
@@ -1,26 +1,13 @@
1
- require 'multi_json'
2
- require 'jwt'
3
- require 'omniauth/strategies/oauth2'
4
- require 'uri'
1
+ require 'omniauth-oauth2'
5
2
 
6
3
  module OmniAuth
7
4
  module Strategies
8
5
  class Myvr < OmniAuth::Strategies::OAuth2
9
- if ENV['MYVR_DEV']
10
- BASE_SCOPE_URL = "http://local.api.myvr.com:8000/auth/"
11
- option :client_options, {
12
- :site => 'http://local.myvr.com:8000/',
13
- :authorize_url => 'http://local.myvr.com:8000/connect/oauth/auth/',
14
- :token_url => 'http://api.local.myvr.com:8000/oauth/token/'
15
- }
16
- else
17
- BASE_SCOPE_URL = "https://api.myvr.com/auth/"
18
- option :client_options, {
19
- :site => 'https://myvr.com/',
20
- :authorize_url => 'https://myvr.com/connect/oauth/auth/',
21
- :token_url => 'https://api.myvr.com/oauth/token/'
22
- }
23
- end
6
+ option :client_options, {
7
+ :site => 'https://myvr.com/',
8
+ :authorize_url => 'https://myvr.com/connect/oauth/auth/',
9
+ :token_url => 'https://api.myvr.com/oauth/token/'
10
+ }
24
11
 
25
12
  BASE_SCOPES = %w[property_read]
26
13
  DEFAULT_SCOPE = 'property_read'
@@ -28,12 +15,12 @@ module OmniAuth
28
15
  option :name, 'myvr'
29
16
  option :authorize_params, {grant_type: 'authorization_code'}
30
17
 
18
+ credentials do
19
+ access_token.params
20
+ end
21
+
31
22
  def build_access_token
32
- token_params = {
33
- :client_secret => client.secret,
34
- :grant_type => 'authorization_code',
35
- :parse => true
36
- }
23
+ token_params = {}
37
24
  verifier = request.params['code']
38
25
  client.auth_code.get_token(verifier, token_params)
39
26
  end
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "omniauth-myvr"
6
- s.version = "0.1.7"
6
+ s.version = "1.0.0"
7
7
  s.authors = ["CJ Avilla"]
8
8
  s.email = ["cjavilla@gmail.com"]
9
9
  s.homepage = "https://github.com/w1zeman1p/omniauth-myvr"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-myvr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - CJ Avilla
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-25 00:00:00.000000000 Z
11
+ date: 2017-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth