omniauth-myvr 0.1.7 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -0
- data/lib/omniauth/strategies/myvr.rb +11 -24
- data/omniauth-myvr.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b30440966b59a3731c49d432fb477cd758ecfed
|
4
|
+
data.tar.gz: d2ee806725b8872642d0f2b980fe68c99b0b5b0a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 675bab1c18910bf6361755ac5236c88dd533d8c4227b8235d58ea7b92c3eb7afd04226e7ea3af10695a92cf6fc7b5b6fe9590f5fc3f67fcbf28822537cce87e8
|
7
|
+
data.tar.gz: 9875c299039696dc912cd127924b41f9addeeb8f90a89fdbf4a60e264032ac428e735825311d8ab121a3e0ff5505045f66aa241ebda9d594bc26838accd057dd
|
data/README.md
CHANGED
@@ -1,26 +1,13 @@
|
|
1
|
-
require '
|
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
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
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
|
data/omniauth-myvr.gemspec
CHANGED
@@ -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.
|
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.
|
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-
|
11
|
+
date: 2017-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth
|