oo_auth 1.0.2 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 178f38351c6f267d456819463e4ca2c93926117870d861ec72e3ed29683b3a37
4
- data.tar.gz: f1ac00838a7e75882e43b66e3375c1fa98dc53a2fcbbfe1b56318b3f1d6a67fe
3
+ metadata.gz: 0e3c25ecc07c0f5e8a9bb658923875e6752758f47e1bd8853a96600f7f0f5037
4
+ data.tar.gz: b9ef1572c7a6debae566c0ecdb890a7a45c9c7014ea0f2b38e3778d87d9fa90c
5
5
  SHA512:
6
- metadata.gz: b6ce16bde9a6ab1cd8d7efec77c37384bf638dd1b0a7fdb860fdbba53da60a52352beaeb2211f7a44df6507e3e18cfacfae9d82ee0e4c75eeae859613d5ba893
7
- data.tar.gz: 327e56fb32b8bf427aa91729f03edb33809eba68282c4acd0c80c9405b88d9bf217a98e89ef41b9c4f189b17c0b4223bebcce7bc0f5269dcb5fc6c8696607103
6
+ metadata.gz: cd0feb225e94f8f7fc260f10ffc628b5d8d5f5482a7158670cd7e1dd0a0a9e51fa24227b71ff94eaa0bf62732f4ab80ad2d138c7b12d3f53615f38fbb474721e
7
+ data.tar.gz: 47aca33e5594764cf1759b392930fd0ab6e0c7507c7a2e6b6c68659309713e43b094eb016f50b896ffc3617a070ceabf2e460b35607111489e6441ea38174921
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- [![Gem Version](https://badge.fury.io/rb/oo_auth.png)](http://badge.fury.io/rb/oo_auth) [![Build Status](https://travis-ci.org/mtgrosser/girocode.svg)](https://travis-ci.org/mtgrosser/girocode) [![Code Climate](https://codeclimate.com/github/mtgrosser/oo_auth.png)](https://codeclimate.com/github/mtgrosser/oo_auth)
1
+ [![Gem Version](https://badge.fury.io/rb/oo_auth.png)](http://badge.fury.io/rb/oo_auth) [![build](https://github.com/mtgrosser/oo_auth/actions/workflows/build.yml/badge.svg)](https://github.com/mtgrosser/oo_auth/actions/workflows/build.yml) [![Code Climate](https://codeclimate.com/github/mtgrosser/oo_auth.png)](https://codeclimate.com/github/mtgrosser/oo_auth)
2
2
 
3
3
  # oo_auth
4
4
 
@@ -3,15 +3,14 @@ module OoAuth
3
3
  class RedisStore < AbstractStore
4
4
  attr_reader :redis, :namespace, :ttl
5
5
 
6
- def initialize(options = {})
7
- options.symbolize_keys!
6
+ def initialize(**options)
8
7
  @namespace = options.delete(:namespace)
9
8
  @ttl = options.delete(:ttl) || 15.minutes
10
- @redis = Redis.new(options)
9
+ @redis = Redis.new(**options)
11
10
  end
12
11
 
13
12
  def remember(nonce)
14
- return nonce if @redis.set(key(nonce), '1', { nx: true, ex: ttl })
13
+ return nonce if @redis.set(key(nonce), '1', nx: true, ex: ttl)
15
14
  false
16
15
  rescue Errno::ECONNREFUSED
17
16
  false
@@ -21,8 +20,8 @@ module OoAuth
21
20
 
22
21
  def key(nonce)
23
22
  "#{@namespace}:oo_auth_nonce:#{nonce.timestamp}:#{nonce.value}"
24
- end
23
+ end
25
24
 
26
25
  end
27
26
  end
28
- end
27
+ end
@@ -1,3 +1,3 @@
1
1
  module OoAuth
2
- VERSION = '1.0.2'
2
+ VERSION = '1.1.0'
3
3
  end
data/lib/oo_auth.rb CHANGED
@@ -109,16 +109,16 @@ module OoAuth
109
109
  end
110
110
 
111
111
  # Use this to sign Net::HTTP or ActionDispatch requests
112
- def sign!(*args)
112
+ def sign!(*args, **kwargs)
113
113
  credentials = args.pop
114
- proxy = RequestProxy.new(*args)
114
+ proxy = RequestProxy.new(*args, **kwargs)
115
115
  Signature.sign!(proxy, credentials)
116
116
  end
117
117
 
118
118
  # Use this in your controllers to verify the OAuth signature
119
119
  # of a request.
120
- def authorize!(*args)
121
- proxy = RequestProxy.new(*args)
120
+ def authorize!(...)
121
+ proxy = RequestProxy.new(...)
122
122
  return unless authorization = self.authorization(proxy.consumer_key, proxy.token)
123
123
  return unless Signature.verify!(proxy, authorization.credentials)
124
124
  authorization
metadata CHANGED
@@ -1,92 +1,21 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oo_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthias Grosser
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-16 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: byebug
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: simplecov
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: rake
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: 0.8.7
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: 0.8.7
55
- - !ruby/object:Gem::Dependency
56
- name: minitest
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '4.7'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '4.7'
69
- - !ruby/object:Gem::Dependency
70
- name: timecop
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: 0.6.3
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: 0.6.3
11
+ date: 2023-05-25 00:00:00.000000000 Z
12
+ dependencies: []
83
13
  description: Out Of Band OAuth
84
14
  email: mtgrosser@gmx.net
85
15
  executables: []
86
16
  extensions: []
87
17
  extra_rdoc_files: []
88
18
  files:
89
- - CHANGELOG
90
19
  - LICENSE
91
20
  - README.md
92
21
  - lib/oo_auth.rb
@@ -103,7 +32,7 @@ homepage: http://github.com/mtgrosser/oo_auth
103
32
  licenses:
104
33
  - MIT
105
34
  metadata: {}
106
- post_install_message:
35
+ post_install_message:
107
36
  rdoc_options: []
108
37
  require_paths:
109
38
  - lib
@@ -111,15 +40,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
111
40
  requirements:
112
41
  - - ">="
113
42
  - !ruby/object:Gem::Version
114
- version: '2.0'
43
+ version: '3.0'
115
44
  required_rubygems_version: !ruby/object:Gem::Requirement
116
45
  requirements:
117
46
  - - ">="
118
47
  - !ruby/object:Gem::Version
119
48
  version: '0'
120
49
  requirements: []
121
- rubygems_version: 3.0.3
122
- signing_key:
50
+ rubygems_version: 3.3.26
51
+ signing_key:
123
52
  specification_version: 4
124
53
  summary: OAuth without the callbacks
125
54
  test_files: []
data/CHANGELOG DELETED
@@ -1,7 +0,0 @@
1
- 1.0.0 - 2015-11-16
2
-
3
- * Support HMAC-SHA256
4
-
5
- 0.0.1 - 2013-11-06
6
-
7
- * First release