oauth2c 1.0.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/oauth2c/agent.rb +13 -1
- data/lib/oauth2c/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 119083bad261124505a0b2bc3625c95b3ebc33cbc8551a881f3ce851080a868e
|
4
|
+
data.tar.gz: aad20285a99bcd72ac24f48bcdae7489fb6b999707ca8758faa8a2a4c5fa96bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5c1c87d0ede559cfec78667e1642195a273a31f7875759a372ea3a9118966eb684ec14df0a47e3f1cad77e5a40b0d3133d499baa1e51d4997ad0777590f0a01
|
7
|
+
data.tar.gz: 0ebd17c7870a31f910e7ad653d47c7a8845398bd15f848dd319060697f780ddf8d66e97cabf3077474f814fbbeb910c5a3e25b400df9db0c79dde474400aaf7e
|
data/CHANGELOG.md
CHANGED
data/lib/oauth2c/agent.rb
CHANGED
@@ -33,12 +33,24 @@ module OAuth2c
|
|
33
33
|
|
34
34
|
@http_client = HTTP.nodelay
|
35
35
|
.accept("application/json")
|
36
|
-
.headers(
|
36
|
+
.headers(
|
37
|
+
"Content-Type": "application/x-www-form-urlencoded; encoding=UTF-8",
|
38
|
+
"User-Agent": user_agent_header
|
39
|
+
)
|
37
40
|
unless @client_credentials_on_body
|
38
41
|
@http_client = @http_client.basic_auth(user: @client_id, pass: @client_secret)
|
39
42
|
end
|
40
43
|
end
|
41
44
|
|
45
|
+
def user_agent_header
|
46
|
+
gem_name = "oauth2c"
|
47
|
+
gem_version = OAuth2c::VERSION
|
48
|
+
app_name = ENV.fetch("APP_NAME", nil) # rubocop:disable Env/OutsideConfig, Env/UndefinedVar
|
49
|
+
formatted_app_name = (app_name ? " (#{app_name})" : "")
|
50
|
+
|
51
|
+
"#{gem_name}/#{gem_version}#{formatted_app_name}"
|
52
|
+
end
|
53
|
+
|
42
54
|
def authz_url(response_type:, state:, scope: [], **params)
|
43
55
|
if @authz_url.nil?
|
44
56
|
raise ConfigError, "authz_url not informed for client"
|
data/lib/oauth2c/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oauth2c
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Doximity
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http
|
@@ -198,7 +198,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
198
198
|
version: '0'
|
199
199
|
requirements: []
|
200
200
|
rubyforge_project:
|
201
|
-
rubygems_version: 2.7.
|
201
|
+
rubygems_version: 2.7.6
|
202
202
|
signing_key:
|
203
203
|
specification_version: 4
|
204
204
|
summary: OAuth2c is a extensible OAuth2 client implementation
|