oauth2_mac_client 0.0.1 → 0.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.
- data/.travis.yml +5 -0
- data/LICENSE +1 -1
- data/README.rdoc +5 -0
- data/lib/oauth2_mac_client.rb +2 -1
- data/lib/oauth2_mac_client/version.rb +1 -1
- data/oauth2_mac_client.gemspec +1 -0
- data/spec/oauth2_mac_client/token_spec.rb +5 -5
- metadata +18 -6
data/.travis.yml
ADDED
data/LICENSE
CHANGED
data/README.rdoc
CHANGED
@@ -1,13 +1,18 @@
|
|
1
|
+
{<img src="https://secure.travis-ci.org/herestomwiththeweather/oauth2_mac_client.png" alt="Build Status" />}[http://travis-ci.org/herestomwiththeweather/oauth2_mac_client]
|
2
|
+
|
1
3
|
= oauth2_mac_client
|
2
4
|
|
3
5
|
OAuth 2.0 MAC Client Library.
|
4
6
|
|
7
|
+
This library does not include an HTTP client so that the choice is left to the developer. Thanks to nov for rack-oauth2 library! You can quickly try out the code: https://gist.github.com/2024309
|
8
|
+
|
5
9
|
== Installation
|
6
10
|
|
7
11
|
gem install oauth2_mac_client
|
8
12
|
|
9
13
|
== Resources
|
10
14
|
|
15
|
+
* Sample code using Net::HTTP (https://gist.github.com/2024309)
|
11
16
|
* View Source on GitHub (https://github.com/herestomwiththeweather/oauth2_mac_client)
|
12
17
|
* Report Issues on GitHub (https://github.com/herestomwiththeweather/oauth2_mac_client/issues)
|
13
18
|
|
data/lib/oauth2_mac_client.rb
CHANGED
data/oauth2_mac_client.gemspec
CHANGED
@@ -4,10 +4,10 @@ module Oauth2MacClient
|
|
4
4
|
describe Token do
|
5
5
|
let :token do
|
6
6
|
Token.new(
|
7
|
-
access_token
|
8
|
-
mac_key
|
9
|
-
mac_algorithm
|
10
|
-
issued_at
|
7
|
+
:access_token => 'access_token',
|
8
|
+
:mac_key => 'secret',
|
9
|
+
:mac_algorithm => 'hmac-sha-256',
|
10
|
+
:issued_at => issued_at
|
11
11
|
)
|
12
12
|
end
|
13
13
|
|
@@ -19,7 +19,7 @@ module Oauth2MacClient
|
|
19
19
|
|
20
20
|
describe '.calculate_hmac' do
|
21
21
|
it "produces the hmac expected from the spec" do
|
22
|
-
@token = Token.new(access_token
|
22
|
+
@token = Token.new(:access_token => 'abc',:mac_key => '8yfrufh348h',:mac_algorithm => 'hmac-sha-1')
|
23
23
|
@token.nonce = '273156:di3hvdf8'
|
24
24
|
@token.method = 'POST'
|
25
25
|
@token.request_uri = '/request'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oauth2_mac_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-03-
|
12
|
+
date: 2012-03-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
16
|
-
requirement: &
|
16
|
+
requirement: &84457880 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,21 @@ dependencies:
|
|
21
21
|
version: '2.3'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *84457880
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: rake
|
27
|
+
requirement: &84457670 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
type: :development
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *84457670
|
25
36
|
- !ruby/object:Gem::Dependency
|
26
37
|
name: rspec
|
27
|
-
requirement: &
|
38
|
+
requirement: &84457400 !ruby/object:Gem::Requirement
|
28
39
|
none: false
|
29
40
|
requirements:
|
30
41
|
- - ! '>='
|
@@ -32,7 +43,7 @@ dependencies:
|
|
32
43
|
version: '0'
|
33
44
|
type: :development
|
34
45
|
prerelease: false
|
35
|
-
version_requirements: *
|
46
|
+
version_requirements: *84457400
|
36
47
|
description: Send requests to OAuth 2 provider with MAC authentication
|
37
48
|
email:
|
38
49
|
- herestomwiththeweather@gmail.com
|
@@ -42,6 +53,7 @@ extra_rdoc_files: []
|
|
42
53
|
files:
|
43
54
|
- .gitignore
|
44
55
|
- .rspec
|
56
|
+
- .travis.yml
|
45
57
|
- Gemfile
|
46
58
|
- LICENSE
|
47
59
|
- README.rdoc
|