omniauth-xero 1.0.1 → 1.0.2
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/README.md +1 -1
- data/lib/omniauth/strategies/xero.rb +22 -8
- data/lib/omniauth/xero/version.rb +1 -1
- data/omniauth-xero.gemspec +1 -1
- metadata +5 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0844030fe32a0da2ec57521623fca288453d4254'
|
4
|
+
data.tar.gz: d3401f795e0793fb41303aa29baccdd4eed76663
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f011747a6f2eae6b9205b857ea728389724483e2af634f9577122bbf8a951a258db94e67642791da0637997264d0bc2a43bd3d3cb363e9d5b449b0419f1af405
|
7
|
+
data.tar.gz: 16bed3085af7a992e203d58917e697ce3bdc8dac5b7488b5717a0f7226fecda7e198caca926dca3edc82dbcf0fc0db86fffa26603af8902a94bfaa4c1aace264
|
data/README.md
CHANGED
@@ -7,29 +7,43 @@ module OmniAuth
|
|
7
7
|
args [:consumer_key, :consumer_secret]
|
8
8
|
|
9
9
|
option :client_options, {
|
10
|
-
:
|
11
|
-
:
|
12
|
-
:
|
13
|
-
:
|
10
|
+
access_token_path: "/oauth/AccessToken",
|
11
|
+
authorize_path: "/oauth/Authorize",
|
12
|
+
request_token_path: "/oauth/RequestToken",
|
13
|
+
site: "https://api.xero.com",
|
14
14
|
}
|
15
15
|
|
16
|
+
credentials do
|
17
|
+
{
|
18
|
+
token: access_token.token,
|
19
|
+
secret: access_token.secret,
|
20
|
+
expires_at: (Time.now + Integer(access_token.params[:oauth_expires_in])).to_i,
|
21
|
+
session_handle: access_token.params[:oauth_session_handle],
|
22
|
+
authorization_expires_at: access_token.params[:oauth_authorization_expires_in]
|
23
|
+
}
|
24
|
+
end
|
25
|
+
|
16
26
|
info do
|
17
27
|
{
|
18
|
-
:
|
19
|
-
:
|
28
|
+
first_name: raw_info["FirstName"],
|
29
|
+
last_name: raw_info["LastName"],
|
30
|
+
email: raw_info["EmailAddress"]
|
20
31
|
}
|
21
32
|
end
|
22
33
|
|
23
34
|
uid { raw_info["UserID"] }
|
24
35
|
|
25
36
|
extra do
|
26
|
-
{
|
37
|
+
{
|
38
|
+
raw_info: raw_info,
|
39
|
+
xero_org_muid: access_token.params[:xero_org_muid]
|
40
|
+
}
|
27
41
|
end
|
28
42
|
|
29
43
|
private
|
30
44
|
|
31
45
|
def raw_info
|
32
|
-
@raw_info ||= users.find { |user| user["IsSubscriber"] }
|
46
|
+
@raw_info ||= users.find { |user| user["IsSubscriber"] } || users.first
|
33
47
|
end
|
34
48
|
|
35
49
|
def users
|
data/omniauth-xero.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-xero
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kale Worsley
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth-oauth
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '3.0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '3.0'
|
69
69
|
description: Xero authentication strategy for OmniAuth.
|
70
70
|
email:
|
71
71
|
- kale@worsley.co.nz
|
@@ -105,11 +105,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
105
105
|
version: '0'
|
106
106
|
requirements: []
|
107
107
|
rubyforge_project:
|
108
|
-
rubygems_version: 2.
|
108
|
+
rubygems_version: 2.5.2
|
109
109
|
signing_key:
|
110
110
|
specification_version: 4
|
111
111
|
summary: Xero authentication strategy for OmniAuth.
|
112
112
|
test_files:
|
113
113
|
- spec/omniauth/strategies/xero_spec.rb
|
114
114
|
- spec/spec_helper.rb
|
115
|
-
has_rdoc:
|