zaikio-oauth_client 0.3.8 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -8
- data/app/models/zaikio/access_token.rb +3 -3
- data/lib/zaikio/oauth_client/configuration.rb +2 -2
- data/lib/zaikio/oauth_client/version.rb +1 -1
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4acce9f2a5a527a4f5e6d407f2a345149215e906ca155488f5bc65fc8a0a3a62
|
4
|
+
data.tar.gz: a8d208cb534f3fa52c41bd959efbd20956e1f5fc8302d9e807b1af60da02c8f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2cbeff0fd6c94ea3566c7e970f2872741c240f5241a987cc838be5923fcb2a7fdf3e53d639aedcfb8b830d07de3acea1208230479896fb5f501a821cb352a53
|
7
|
+
data.tar.gz: 07ec99742b7fd32aa9c9874257092f7e361cadd3c5dfd95eeb45bbeb09a711bb2b01955e9700b9568dfca82ee696d23293c081977df07861c243edfbb288c39f
|
data/README.md
CHANGED
@@ -234,14 +234,15 @@ If you use the provided OAuth credentials from above and test this against the S
|
|
234
234
|
|
235
235
|
**Make sure you have the dummy app running locally to validate your changes.**
|
236
236
|
|
237
|
-
Make your changes and
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
-
|
242
|
-
- `
|
243
|
-
|
244
|
-
|
237
|
+
- Make your changes and submit a pull request for them
|
238
|
+
- Make sure to update `CHANGELOG.md`
|
239
|
+
|
240
|
+
To release a new version of the gem:
|
241
|
+
- Update the version in `lib/zaikio/oauth_client/version.rb`
|
242
|
+
- Update `CHANGELOG.md` to include the new version and its release date
|
243
|
+
- Commit and push your changes
|
244
|
+
- Create a [new release on GitHub](https://github.com/zaikio/zaikio-directory-models/releases/new)
|
245
|
+
- CircleCI will build the Gem package and push it Rubygems for you
|
245
246
|
|
246
247
|
## License
|
247
248
|
|
@@ -26,7 +26,7 @@ module Zaikio
|
|
26
26
|
# Scopes
|
27
27
|
scope :valid, lambda {
|
28
28
|
where("expires_at > :now", now: Time.current)
|
29
|
-
.where.not(id: Zaikio::JWTAuth.
|
29
|
+
.where.not(id: Zaikio::JWTAuth.revoked_token_ids)
|
30
30
|
}
|
31
31
|
scope :with_invalid_refresh_token, lambda {
|
32
32
|
where("created_at <= ?", Time.current - Zaikio::AccessToken.refresh_token_valid_for)
|
@@ -36,14 +36,14 @@ module Zaikio
|
|
36
36
|
now: Time.current,
|
37
37
|
created_at_max: Time.current - refresh_token_valid_for)
|
38
38
|
.where("refresh_token IS NOT NULL")
|
39
|
-
.where.not(id: Zaikio::JWTAuth.
|
39
|
+
.where.not(id: Zaikio::JWTAuth.revoked_token_ids)
|
40
40
|
}
|
41
41
|
scope :by_bearer, lambda { |bearer_type: "Person", bearer_id:, scopes: []|
|
42
42
|
where(bearer_type: bearer_type, bearer_id: bearer_id)
|
43
43
|
.where("scopes @> ARRAY[?]::varchar[]", scopes)
|
44
44
|
}
|
45
45
|
scope :usable, lambda { |options|
|
46
|
-
by_bearer(options).valid.or(by_bearer(options).valid_refresh)
|
46
|
+
by_bearer(**options).valid.or(by_bearer(**options).valid_refresh)
|
47
47
|
.order(expires_at: :desc)
|
48
48
|
}
|
49
49
|
|
@@ -7,8 +7,8 @@ module Zaikio
|
|
7
7
|
HOSTS = {
|
8
8
|
development: "http://hub.zaikio.test",
|
9
9
|
test: "http://hub.zaikio.test",
|
10
|
-
staging: "https://
|
11
|
-
sandbox: "https://
|
10
|
+
staging: "https://hub.staging.zaikio.com",
|
11
|
+
sandbox: "https://hub.sandbox.zaikio.com",
|
12
12
|
production: "https://hub.zaikio.com"
|
13
13
|
}.freeze
|
14
14
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zaikio-oauth_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zaikio GmbH
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -47,7 +47,7 @@ dependencies:
|
|
47
47
|
version: 0.2.1
|
48
48
|
- - "<"
|
49
49
|
- !ruby/object:Gem::Version
|
50
|
-
version: 0.
|
50
|
+
version: 0.5.0
|
51
51
|
type: :runtime
|
52
52
|
prerelease: false
|
53
53
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -57,7 +57,7 @@ dependencies:
|
|
57
57
|
version: 0.2.1
|
58
58
|
- - "<"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: 0.
|
60
|
+
version: 0.5.0
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: pg
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -119,10 +119,11 @@ files:
|
|
119
119
|
- lib/zaikio/oauth_client/engine.rb
|
120
120
|
- lib/zaikio/oauth_client/test_helper.rb
|
121
121
|
- lib/zaikio/oauth_client/version.rb
|
122
|
-
homepage: https://
|
122
|
+
homepage: https://github.com/zaikio/zaikio-oauth_client
|
123
123
|
licenses:
|
124
124
|
- MIT
|
125
|
-
metadata:
|
125
|
+
metadata:
|
126
|
+
changelog_uri: https://github.com/zaikio/zaikio-oauth_client/blob/master/CHANGELOG.md
|
126
127
|
post_install_message:
|
127
128
|
rdoc_options: []
|
128
129
|
require_paths:
|
@@ -138,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
138
139
|
- !ruby/object:Gem::Version
|
139
140
|
version: '0'
|
140
141
|
requirements: []
|
141
|
-
rubygems_version: 3.
|
142
|
+
rubygems_version: 3.2.3
|
142
143
|
signing_key:
|
143
144
|
specification_version: 4
|
144
145
|
summary: Zaikio Platform Connectivity
|