Skip to content

Commit 94d5b4b

Browse files
Merge pull request #5 from doximity/jh_remove_dox_references
Remove dox references from user agent header.
2 parents 797bc6f + dc1c100 commit 94d5b4b

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 1.1.1 01/16/2020
2+
* Removed doximity references from code
3+
14
## 1.1.0 - 12/16/2019
25
* Set User-Agent header on agent requests
36

lib/oauth2c/agent.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ def initialize(authz_url: nil, token_url:, client_id:, client_secret: nil,
4343
end
4444

4545
def user_agent_header
46-
gem_name = "dox-oauth2c"
46+
gem_name = "oauth2c"
4747
gem_version = OAuth2c::VERSION
4848
app_name = ENV.fetch("APP_NAME", nil) # rubocop:disable Env/OutsideConfig, Env/UndefinedVar
4949
formatted_app_name = (app_name ? " (#{app_name})" : "")
5050

51-
"dox-#{gem_name}/#{gem_version}#{formatted_app_name}"
51+
"#{gem_name}/#{gem_version}#{formatted_app_name}"
5252
end
5353

5454
def authz_url(response_type:, state:, scope: [], **params)

lib/oauth2c/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
# limitations under the License.
1414

1515
module OAuth2c
16-
VERSION = '1.1.0'.freeze
16+
VERSION = '1.1.1'.freeze
1717
end

spec/oauth2c/agent_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
it "fetches a token based on the strategy" do
3434
# Testing an environment variable that is expected to be set by an outside source and used in
3535
# the user agent header
36-
allow(ENV).to receive(:fetch).with("APP_NAME", nil).and_return("DoximityApp") # rubocop:disable Env/OutsideConfig
36+
allow(ENV).to receive(:fetch).with("APP_NAME", nil).and_return("GenericApp") # rubocop:disable Env/OutsideConfig
3737

3838
stub_request(:post, "http://authz.test/oauth/token")
3939
.with(
@@ -42,7 +42,7 @@
4242
"Accept": "application/json",
4343
"Authorization": "Basic Q0xJRU5UX0lEOkNMSUVOVF9TRUNSRVQ=",
4444
"Content-Type": "application/x-www-form-urlencoded; encoding=UTF-8",
45-
"User-Agent": "dox-dox-oauth2c/#{OAuth2c::VERSION} (DoximityApp)"
45+
"User-Agent": "oauth2c/#{OAuth2c::VERSION} (GenericApp)"
4646
}
4747
)
4848
.to_return(

0 commit comments

Comments
 (0)