Skip to content

Commit 048786c

Browse files
authored
Remove deprecated credential methods from credential providers (#2132)
1 parent aab204f commit 048786c

File tree

3 files changed

+2
-45
lines changed

3 files changed

+2
-45
lines changed

gems/aws-sdk-core/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
Unreleased Changes
22
------------------
33

4+
* Feature - Remove deprecated `access_key_id`, `secret_access_key`, and `session_token` methods in credential providers.
5+
46
3.74.0 (2019-11-05)
57
------------------
68

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
require_relative 'deprecations'
2-
31
module Aws
42
module CredentialProvider
53

6-
extend Deprecations
7-
84
# @return [Credentials]
95
attr_reader :credentials
106

@@ -13,29 +9,5 @@ def set?
139
!!credentials && credentials.set?
1410
end
1511

16-
# @deprecated This method is subject to errors from a race condition when
17-
# called against refreshable credential objects. This will be removed.
18-
# @see #credentials
19-
def access_key_id
20-
credentials ? credentials.access_key_id : nil
21-
end
22-
deprecated(:access_key_id, use: '#credentials', version: '3.75')
23-
24-
# @deprecated This method is subject to errors from a race condition when
25-
# called against refreshable credential objects. This will be removed.
26-
# @see #credentials
27-
def secret_access_key
28-
credentials ? credentials.secret_access_key : nil
29-
end
30-
deprecated(:secret_access_key, use: '#credentials', version: '3.75')
31-
32-
# @deprecated This method is subject to errors from a race condition when
33-
# called against refreshable credential objects. This will be removed.
34-
# @see #credentials
35-
def session_token
36-
credentials ? credentials.session_token : nil
37-
end
38-
deprecated(:session_token, use: '#credentials', version: '3.75')
39-
4012
end
4113
end

gems/aws-sdk-core/spec/aws/assume_role_credentials_spec.rb

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -100,22 +100,5 @@ module Aws
100100
c.credentials
101101
end
102102

103-
it 'generates deprecation warnings for credential accessors' do
104-
c = AssumeRoleCredentials.new(
105-
role_arn: 'arn',
106-
role_session_name: 'session')
107-
108-
expect(c).to receive(:warn).exactly(3).times
109-
110-
c.access_key_id
111-
c.secret_access_key
112-
c.session_token
113-
114-
# warnings are not duplicated
115-
c.access_key_id
116-
c.secret_access_key
117-
c.session_token
118-
end
119-
120103
end
121104
end

0 commit comments

Comments
 (0)