identity-gateway 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
  SHA1:
3
- metadata.gz: 0e721ce9972b4cb76a467778243966b45dc7014b
4
- data.tar.gz: d1480c5dd6be0551e10b7706619b63d449a70435
3
+ metadata.gz: 64a6769951845fbdc09fe46d675da1b47358d1d3
4
+ data.tar.gz: d4c5b0257b8834b39f0f16e59c5c89f370162898
5
5
  SHA512:
6
- metadata.gz: 00897969823bcbd28e154cc6323f4c3593146d25d1fd11d72d43d56043ec44c612c8744bfdf9ed92f9b462e9cd5ed9c490ec7ed32557c1f1db2fdabcddd07592
7
- data.tar.gz: 4767d438baffbcc32016bd3ce7023ac1154c9addab9fbbb56e3f97a3b975d573bdfe3f1b224265a69ff675fa8e09328783b07e0905014f675142c6ceae3ed775
6
+ metadata.gz: 0dca2931cca5a5b275a72fd3a6b999930ee254a2f50720f2d84c8645e8a1d76271756ce53715c7fce3becb03a960cbea5f8c97f943312d8c918532168928ad9e
7
+ data.tar.gz: e1712e03ed5c51ed3e4762458f1546bc0b324181028b6bb93a1fa08da716ccc55da205efaf2a5e2e5e7bfddca0fd1537c0d247ad28b601b6a011423b9d313771
@@ -0,0 +1 @@
1
+ 2.2.4
data/README.md CHANGED
@@ -1,8 +1,7 @@
1
1
  # Identity::Gateway
2
2
 
3
- [![Gem Version][GV img]][Gem Version]
4
- [Gem Version]: https://rubygems.org/gems/identity-gateway
5
- [GV img]: https://img.shields.io/gem/v/identity-gateway.svg
3
+ [![Gem Version](https://img.shields.io/gem/v/identity-gateway.svg)](https://rubygems.org/gems/identity-gateway)
4
+ [![CircleCI](https://circleci.com/gh/wamland-team/identity-gateway.svg?style=shield&circle-token=b03fdcc75674d173f58a296cb1a3b2162b6828dc)](https://circleci.com/gh/wamland-team/identity-gateway)
6
5
 
7
6
  Identity's gateway provider for Ruby and Rails applications. Act as a man in the middle between backend services and Identity.
8
7
 
@@ -88,10 +87,10 @@ class ApplicationController < ActionController::Base
88
87
  end
89
88
  ```
90
89
 
91
- Alternatively, you can globally handle Identity::Gateway::Unauthorized's by having rails handle them as a 403 error and serving a 403 error page. Add the following to application.rb:
90
+ Alternatively, you can globally handle Identity::Gateway::Unauthorized's by having rails handle them as a 401 error and serving a 401 error page. Add the following to application.rb:
92
91
 
93
92
  ```ruby
94
- config.action_dispatch.rescue_responses['Identity::Gateway::Unauthorized'] = :forbidden
93
+ config.action_dispatch.rescue_responses['Identity::Gateway::Unauthorized'] = :unauthorized
95
94
  ```
96
95
 
97
96
  ## Configuration
@@ -0,0 +1,11 @@
1
+ machine:
2
+ ruby:
3
+ version: 2.2.4
4
+
5
+ ## Customize dependencies
6
+ dependencies:
7
+ pre:
8
+ - sudo apt-get update
9
+ override:
10
+ - bundle install: # note ':' here
11
+ timeout: 180 # fail if command has no output for 3 minutes
@@ -21,10 +21,10 @@ Gem::Specification.new do |spec|
21
21
  f.match(%r{^(test|spec|features)/})
22
22
  end
23
23
 
24
- spec.required_ruby_version = '>= 1.9.3'
24
+ spec.required_ruby_version = '>= 2.2.2'
25
25
 
26
26
  spec.add_dependency 'httparty', '~> 0.13'
27
- spec.add_development_dependency 'bundler', '~> 1.14.6', '>= 1.14.6'
27
+ spec.add_development_dependency 'bundler'
28
28
  spec.add_development_dependency 'rake', '~> 11.3'
29
29
  spec.add_development_dependency 'rspec', '~> 3.5'
30
30
  spec.add_development_dependency 'rubocop', '~> 0.47.1'
@@ -41,6 +41,18 @@ module Identity
41
41
  @subject
42
42
  end
43
43
 
44
+ # Revoke access token.
45
+ #
46
+ # ==== Returns
47
+ # * <tt>HTTParty::Response</tt>.
48
+ def revoke_access!
49
+ self.class.post(
50
+ "#{@settings.provider_url}/oauth/revoke",
51
+ body: { token: request_token }.to_json,
52
+ headers: api_headers
53
+ )
54
+ end
55
+
44
56
  protected
45
57
 
46
58
  # Try to authorize token against provider.
@@ -1,5 +1,5 @@
1
1
  module Identity
2
2
  module Gateway
3
- VERSION = '1.0.2'.freeze
3
+ VERSION = '1.1.0'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: identity-gateway
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
  - Loic Kartono
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-03-13 00:00:00.000000000 Z
11
+ date: 2020-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -28,22 +28,16 @@ dependencies:
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: 1.14.6
34
31
  - - ">="
35
32
  - !ruby/object:Gem::Version
36
- version: 1.14.6
33
+ version: '0'
37
34
  type: :development
38
35
  prerelease: false
39
36
  version_requirements: !ruby/object:Gem::Requirement
40
37
  requirements:
41
- - - "~>"
42
- - !ruby/object:Gem::Version
43
- version: 1.14.6
44
38
  - - ">="
45
39
  - !ruby/object:Gem::Version
46
- version: 1.14.6
40
+ version: '0'
47
41
  - !ruby/object:Gem::Dependency
48
42
  name: rake
49
43
  requirement: !ruby/object:Gem::Requirement
@@ -96,6 +90,7 @@ files:
96
90
  - ".gitignore"
97
91
  - ".rspec"
98
92
  - ".rubocop.yml"
93
+ - ".ruby-version"
99
94
  - ".travis.yml"
100
95
  - Gemfile
101
96
  - LICENSE.txt
@@ -103,6 +98,7 @@ files:
103
98
  - Rakefile
104
99
  - bin/console
105
100
  - bin/setup
101
+ - circle.yml
106
102
  - identity-gateway.gemspec
107
103
  - lib/identity/gateway.rb
108
104
  - lib/identity/gateway/configuration.rb
@@ -120,7 +116,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
120
116
  requirements:
121
117
  - - ">="
122
118
  - !ruby/object:Gem::Version
123
- version: 1.9.3
119
+ version: 2.2.2
124
120
  required_rubygems_version: !ruby/object:Gem::Requirement
125
121
  requirements:
126
122
  - - ">="