oauth2 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
@@ -1,3 +1,2 @@
1
- ,(�L��pW�����#0s)�z�)n��6�pR��=X�}4� �=ti?����*�=������j��Ң�8�L4�ھ
2
- &�����^�5QP�Bɏ��TK)��
3
- 12�yHΨ�%��s���; �Fr�� �ψ�/��
1
+ Q��
2
+ D!dI��"���N�O�9M�eg��8>�Rn@� �h�O�b�:He�̤q��W��Z���p��#b�7 ��;r�PJ��E�B�xc"�d����"�%��Z���B���*��ʔ)�7�&GH�_�B��˻g<m�^�<�$Fk��,1M�[�����h*랪���� n���S�5�Fi_��X��)H���]�獶S�����Ҹ���M?�,,؁��L�El�[�kq��@����0��]�g��
data/LICENSE.md CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2011 Intridea, Inc. and Michael Bleigh
1
+ Copyright (c) 2011-2013 Michael Bleigh and Intridea, Inc.
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -1,15 +1,32 @@
1
- # OAuth2 [![Build Status](https://secure.travis-ci.org/intridea/oauth2.png?branch=master)][travis] [![Dependency Status](https://gemnasium.com/intridea/oauth2.png?travis)][gemnasium]
1
+ # OAuth2
2
+ [![Gem Version](https://badge.fury.io/rb/oauth2.png)][gem]
3
+ [![Build Status](https://secure.travis-ci.org/intridea/oauth2.png?branch=master)][travis]
4
+ [![Dependency Status](https://gemnasium.com/intridea/oauth2.png?travis)][gemnasium]
5
+ [![Code Climate](https://codeclimate.com/github/intridea/oauth2.png)][codeclimate]
6
+
7
+ [gem]: https://rubygems.org/gems/oauth2
8
+ [travis]: http://travis-ci.org/intridea/oauth2
9
+ [gemnasium]: https://gemnasium.com/intridea/oauth2
10
+ [codeclimate]: https://codeclimate.com/github/intridea/oauth2
11
+
2
12
  A Ruby wrapper for the OAuth 2.0 specification. This is a work in progress,
3
13
  being built first to solve the pragmatic process of connecting to existing
4
14
  OAuth 2.0 endpoints (a.k.a. Facebook) with the goal of building it up to meet
5
15
  the entire specification over time.
6
16
 
7
- [travis]: http://travis-ci.org/intridea/oauth2
8
- [gemnasium]: https://gemnasium.com/intridea/oauth2
9
-
10
17
  ## Installation
11
18
  gem install oauth2
12
19
 
20
+ To ensure the code you're installing hasn't been tampered with, it's
21
+ recommended that you verify the signature. To do this, you need to add my
22
+ public key as a trusted certificate (you only need to do this once):
23
+
24
+ gem cert --add <(curl -Ls https://gist.github.com/sferik/4701180/raw/public_cert.pem)
25
+
26
+ Then, install the gem with the high security trust policy:
27
+
28
+ gem install oauth2 -P HighSecurity
29
+
13
30
  ## Resources
14
31
  * [View Source on GitHub][code]
15
32
  * [Report Issues on GitHub][issues]
@@ -113,7 +130,8 @@ implementation, you will be responsible for providing patches in a timely
113
130
  fashion. If critical issues for a particular implementation exist at the time
114
131
  of a major release, support for that Ruby version may be dropped.
115
132
 
116
- ## Copyright
117
- Copyright (c) 2011 Intridea, Inc. and Michael Bleigh.
118
- See [LICENSE][] for details.
133
+ ## License
134
+ Copyright (c) 2011-2013 Michael Bleigh and Intridea, Inc. See [LICENSE][] for
135
+ details.
136
+
119
137
  [license]: LICENSE.md
@@ -44,6 +44,7 @@ module OAuth2
44
44
  end
45
45
  @expires_in ||= opts.delete('expires')
46
46
  @expires_in &&= @expires_in.to_i
47
+ @expires_at &&= @expires_at.to_i
47
48
  @expires_at ||= Time.now.to_i + @expires_in if @expires_in
48
49
  @options = {:mode => opts.delete(:mode) || :header,
49
50
  :header_format => opts.delete(:header_format) || 'Bearer %s',
@@ -2,7 +2,7 @@ module OAuth2
2
2
  class Version
3
3
  MAJOR = 0 unless defined? MAJOR
4
4
  MINOR = 9 unless defined? MINOR
5
- PATCH = 0 unless defined? PATCH
5
+ PATCH = 1 unless defined? PATCH
6
6
  PRE = nil unless defined? PRE
7
7
 
8
8
  class << self
@@ -59,6 +59,13 @@ describe AccessToken do
59
59
  expect(target.options[:header_format]).to eq('Bearer %')
60
60
  expect(target.options[:mode]).to eq(:body)
61
61
  end
62
+
63
+ it "initializes with a string expires_at" do
64
+ hash = {:access_token => token, :expires_at => '1361396829', 'foo' => 'bar'}
65
+ target = AccessToken.from_hash(client, hash)
66
+ assert_initialized_token(target)
67
+ expect(target.expires_at).to be_a(Integer)
68
+ end
62
69
  end
63
70
 
64
71
  describe "#request" do
metadata CHANGED
@@ -1,161 +1,165 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: oauth2
3
- version: !ruby/object:Gem::Version
4
- hash: 59
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.9.1
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 9
9
- - 0
10
- version: 0.9.0
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Michael Bleigh
14
9
  - Erik Michaels-Ober
15
10
  autorequire:
16
11
  bindir: bin
17
- cert_chain:
18
- - |
19
- -----BEGIN CERTIFICATE-----
20
- MIIDLjCCAhagAwIBAgIBADANBgkqhkiG9w0BAQUFADA9MQ8wDQYDVQQDDAZzZmVy
21
- aWsxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixkARkWA2NvbTAe
22
- Fw0xMzAyMDMxMDAyMjdaFw0xNDAyMDMxMDAyMjdaMD0xDzANBgNVBAMMBnNmZXJp
23
- azEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPyLGQBGRYDY29tMIIB
24
- IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAl0x5dx8uKxi7TkrIuyBUTJVB
25
- v1o93nUB9j/y4M96gV2rYwAci1JPBseNd6Fybzjo3YGuHl7EQHuSHNaf1p2lxew/
26
- y60JXIJBBgPcDK/KCP4NUHofm0jfoYD+H5uNJfHCNq7/ZsTxOtE3Ra92s0BCMTpm
27
- wBMMlWR5MtdEhIYuBO4XhnejYgH0L/7BL2lymntVnsr/agdQoojQCN1IQmsRJvrR
28
- duZRO3tZvoIo1pBc4JEehDuqCeyBgPLOqMoKtQlold1TQs1kWUBK7KWMFEhKC/Kg
29
- zyzKRHQo9yDYwOvYngoBLY+T/lwCT4dyssdhzRbfnxAhaKu4SAssIwaC01yVowID
30
- AQABozkwNzAJBgNVHRMEAjAAMB0GA1UdDgQWBBS0ruDfRak5ci1OpDNX/ZdDEkIs
31
- iTALBgNVHQ8EBAMCBLAwDQYJKoZIhvcNAQEFBQADggEBAHHSMs/MP0sOaLkEv4Jo
32
- zvkm3qn5A6t0vaHx774cmejyMU+5wySxRezspL7ULh9NeuK2OhU+Oe3TpqrAg5TK
33
- R8GQILnVu2FemGA6sAkPDlcPtgA6ieI19PZOF6HVLmc/ID/dP/NgZWWzEeqQKmcK
34
- 2+HM+SEEDhZkScYekw4ZOe164ZtZG816oAv5x0pGitSIkumUp7V8iEZ/6ehr7Y9e
35
- XOg4eeun5L/JjmjARoW2kNdvkRD3c2EeSLqWvQRsBlypHfhs6JJuLlyZPGhU3R/v
36
- Sf3lVKpBCWgRpGTvy45XVpB+59y33PJmEuQ1PTEOYvQyao9UKMAAaAN/7qWQtjl0
37
- hlw=
38
- -----END CERTIFICATE-----
39
-
40
- date: 2013-02-10 00:00:00 Z
41
- dependencies:
42
- - !ruby/object:Gem::Dependency
12
+ cert_chain:
13
+ - !binary |-
14
+ LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURMakNDQWhhZ0F3SUJB
15
+ Z0lCQURBTkJna3Foa2lHOXcwQkFRVUZBREE5TVE4d0RRWURWUVFEREFaelpt
16
+ VnkKYVdzeEZUQVRCZ29Ka2lhSmsvSXNaQUVaRmdWbmJXRnBiREVUTUJFR0Nn
17
+ bVNKb21UOGl4a0FSa1dBMk52YlRBZQpGdzB4TXpBeU1ETXhNREF5TWpkYUZ3
18
+ MHhOREF5TURNeE1EQXlNamRhTUQweER6QU5CZ05WQkFNTUJuTm1aWEpwCmF6
19
+ RVZNQk1HQ2dtU0pvbVQ4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RaRzgxNm9BdjV4MHBHaXRTSWt1bVVwN1Y4
36
+ aUVaLzZlaHI3WTllClhPZzRlZXVuNUwvSmptakFSb1cya05kdmtSRDNjMkVl
37
+ U0xxV3ZRUnNCbHlwSGZoczZKSnVMbHlaUEdoVTNSL3YKU2YzbFZLcEJDV2dS
38
+ cEdUdnk0NVhWcEIrNTl5MzNQSm1FdVExUFRFT1l2UXlhbzlVS01BQWFBTi83
39
+ cVdRdGpsMApobHc9Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K
40
+ date: 2013-02-20 00:00:00.000000000 Z
41
+ dependencies:
42
+ - !ruby/object:Gem::Dependency
43
43
  name: bundler
44
- prerelease: false
45
- requirement: &id001 !ruby/object:Gem::Requirement
44
+ requirement: !ruby/object:Gem::Requirement
46
45
  none: false
47
- requirements:
46
+ requirements:
48
47
  - - ~>
49
- - !ruby/object:Gem::Version
50
- hash: 15
51
- segments:
52
- - 1
53
- - 0
54
- version: "1.0"
48
+ - !ruby/object:Gem::Version
49
+ version: '1.0'
55
50
  type: :development
56
- version_requirements: *id001
57
- - !ruby/object:Gem::Dependency
58
- name: faraday
59
51
  prerelease: false
60
- requirement: &id002 !ruby/object:Gem::Requirement
52
+ version_requirements: !ruby/object:Gem::Requirement
53
+ none: false
54
+ requirements:
55
+ - - ~>
56
+ - !ruby/object:Gem::Version
57
+ version: '1.0'
58
+ - !ruby/object:Gem::Dependency
59
+ name: faraday
60
+ requirement: !ruby/object:Gem::Requirement
61
61
  none: false
62
- requirements:
62
+ requirements:
63
63
  - - ~>
64
- - !ruby/object:Gem::Version
65
- hash: 27
66
- segments:
67
- - 0
68
- - 8
69
- version: "0.8"
64
+ - !ruby/object:Gem::Version
65
+ version: '0.8'
70
66
  type: :runtime
71
- version_requirements: *id002
72
- - !ruby/object:Gem::Dependency
73
- name: httpauth
74
67
  prerelease: false
75
- requirement: &id003 !ruby/object:Gem::Requirement
68
+ version_requirements: !ruby/object:Gem::Requirement
76
69
  none: false
77
- requirements:
70
+ requirements:
78
71
  - - ~>
79
- - !ruby/object:Gem::Version
80
- hash: 9
81
- segments:
82
- - 0
83
- - 1
84
- version: "0.1"
72
+ - !ruby/object:Gem::Version
73
+ version: '0.8'
74
+ - !ruby/object:Gem::Dependency
75
+ name: httpauth
76
+ requirement: !ruby/object:Gem::Requirement
77
+ none: false
78
+ requirements:
79
+ - - ~>
80
+ - !ruby/object:Gem::Version
81
+ version: '0.1'
85
82
  type: :runtime
86
- version_requirements: *id003
87
- - !ruby/object:Gem::Dependency
88
- name: multi_json
89
83
  prerelease: false
90
- requirement: &id004 !ruby/object:Gem::Requirement
84
+ version_requirements: !ruby/object:Gem::Requirement
91
85
  none: false
92
- requirements:
86
+ requirements:
93
87
  - - ~>
94
- - !ruby/object:Gem::Version
95
- hash: 15
96
- segments:
97
- - 1
98
- - 0
99
- version: "1.0"
88
+ - !ruby/object:Gem::Version
89
+ version: '0.1'
90
+ - !ruby/object:Gem::Dependency
91
+ name: multi_json
92
+ requirement: !ruby/object:Gem::Requirement
93
+ none: false
94
+ requirements:
95
+ - - ~>
96
+ - !ruby/object:Gem::Version
97
+ version: '1.0'
100
98
  type: :runtime
101
- version_requirements: *id004
102
- - !ruby/object:Gem::Dependency
103
- name: multi_xml
104
99
  prerelease: false
105
- requirement: &id005 !ruby/object:Gem::Requirement
100
+ version_requirements: !ruby/object:Gem::Requirement
106
101
  none: false
107
- requirements:
102
+ requirements:
108
103
  - - ~>
109
- - !ruby/object:Gem::Version
110
- hash: 1
111
- segments:
112
- - 0
113
- - 5
114
- version: "0.5"
104
+ - !ruby/object:Gem::Version
105
+ version: '1.0'
106
+ - !ruby/object:Gem::Dependency
107
+ name: multi_xml
108
+ requirement: !ruby/object:Gem::Requirement
109
+ none: false
110
+ requirements:
111
+ - - ~>
112
+ - !ruby/object:Gem::Version
113
+ version: '0.5'
115
114
  type: :runtime
116
- version_requirements: *id005
117
- - !ruby/object:Gem::Dependency
118
- name: rack
119
115
  prerelease: false
120
- requirement: &id006 !ruby/object:Gem::Requirement
116
+ version_requirements: !ruby/object:Gem::Requirement
121
117
  none: false
122
- requirements:
118
+ requirements:
123
119
  - - ~>
124
- - !ruby/object:Gem::Version
125
- hash: 11
126
- segments:
127
- - 1
128
- - 2
129
- version: "1.2"
120
+ - !ruby/object:Gem::Version
121
+ version: '0.5'
122
+ - !ruby/object:Gem::Dependency
123
+ name: rack
124
+ requirement: !ruby/object:Gem::Requirement
125
+ none: false
126
+ requirements:
127
+ - - ~>
128
+ - !ruby/object:Gem::Version
129
+ version: '1.2'
130
130
  type: :runtime
131
- version_requirements: *id006
132
- - !ruby/object:Gem::Dependency
133
- name: jwt
134
131
  prerelease: false
135
- requirement: &id007 !ruby/object:Gem::Requirement
132
+ version_requirements: !ruby/object:Gem::Requirement
136
133
  none: false
137
- requirements:
134
+ requirements:
138
135
  - - ~>
139
- - !ruby/object:Gem::Version
140
- hash: 19
141
- segments:
142
- - 0
143
- - 1
144
- - 4
136
+ - !ruby/object:Gem::Version
137
+ version: '1.2'
138
+ - !ruby/object:Gem::Dependency
139
+ name: jwt
140
+ requirement: !ruby/object:Gem::Requirement
141
+ none: false
142
+ requirements:
143
+ - - ~>
144
+ - !ruby/object:Gem::Version
145
145
  version: 0.1.4
146
146
  type: :runtime
147
- version_requirements: *id007
148
- description: A Ruby wrapper for the OAuth 2.0 protocol built with a similar style to the original OAuth spec.
149
- email:
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ none: false
150
+ requirements:
151
+ - - ~>
152
+ - !ruby/object:Gem::Version
153
+ version: 0.1.4
154
+ description: A Ruby wrapper for the OAuth 2.0 protocol built with a similar style
155
+ to the original OAuth spec.
156
+ email:
150
157
  - michael@intridea.com
151
158
  - sferik@gmail.com
152
159
  executables: []
153
-
154
160
  extensions: []
155
-
156
161
  extra_rdoc_files: []
157
-
158
- files:
162
+ files:
159
163
  - .document
160
164
  - CONTRIBUTING.md
161
165
  - LICENSE.md
@@ -185,41 +189,31 @@ files:
185
189
  - spec/oauth2/strategy/implicit_spec.rb
186
190
  - spec/oauth2/strategy/password_spec.rb
187
191
  homepage: http://github.com/intridea/oauth2
188
- licenses:
192
+ licenses:
189
193
  - MIT
190
194
  post_install_message:
191
195
  rdoc_options: []
192
-
193
- require_paths:
196
+ require_paths:
194
197
  - lib
195
- required_ruby_version: !ruby/object:Gem::Requirement
198
+ required_ruby_version: !ruby/object:Gem::Requirement
196
199
  none: false
197
- requirements:
198
- - - ">="
199
- - !ruby/object:Gem::Version
200
- hash: 3
201
- segments:
202
- - 0
203
- version: "0"
204
- required_rubygems_version: !ruby/object:Gem::Requirement
200
+ requirements:
201
+ - - ! '>='
202
+ - !ruby/object:Gem::Version
203
+ version: '0'
204
+ required_rubygems_version: !ruby/object:Gem::Requirement
205
205
  none: false
206
- requirements:
207
- - - ">="
208
- - !ruby/object:Gem::Version
209
- hash: 23
210
- segments:
211
- - 1
212
- - 3
213
- - 6
206
+ requirements:
207
+ - - ! '>='
208
+ - !ruby/object:Gem::Version
214
209
  version: 1.3.6
215
210
  requirements: []
216
-
217
211
  rubyforge_project:
218
- rubygems_version: 1.8.25
212
+ rubygems_version: 1.8.23
219
213
  signing_key:
220
214
  specification_version: 3
221
215
  summary: A Ruby wrapper for the OAuth 2.0 protocol.
222
- test_files:
216
+ test_files:
223
217
  - spec/helper.rb
224
218
  - spec/oauth2/access_token_spec.rb
225
219
  - spec/oauth2/client_spec.rb
metadata.gz.sig CHANGED
@@ -1,3 +1,2 @@
1
- 0�e�`;�n�Ɵ�a���Wq��sS���� ��̇B��|P=����<e����_�8��9h�-� �%}�������K�3i{a:d�ߧb��]�;�7I'LE�����i2vn\;��;6��.�1o+>��6U���#�����cj�p_)Y_���42��
2
- ּHUg����V^�����/��|81�>��W '��cn�'-�u��1.���qN
3
- �HT!�Xc�Z�Ҵn<�L�>ߝV\˨O6�]P�+
1
+ &3��0wQ0{Ce1>����A#����I�����9u����_�����c>�5n�+��ł�CV��~���&$#�2wab�����O��KiUyzy#};�*�5w�*Q�=�۴ZG�cZl�<!k���Eݨ�6(�[��:F_iM����
2
+ ]�SI��d��QН���1�0�S�9W�|�1H`^��('�� T/u��#1Q52�;��s���aL��2@����jfg�����N�ۏ�