aws-sdk-cognitoidentity 1.49.0 → 1.50.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
  SHA256:
3
- metadata.gz: 2050fddb41ca93213bdff77aea623b38148a840c1ecc6683aedd32cba3c41aa6
4
- data.tar.gz: d717eaf0205c2f814bc066a56413a5b1e4a2ae5a9973f6f888c5cdea23855231
3
+ metadata.gz: 2679bb4bb5eebaf9eda43022f89b55b7da26de7209f24576131451ca35d70534
4
+ data.tar.gz: 9f029be7979a8e1fb9d81443a884f3ec7ada052ef188d1353132daa9f5f2d653
5
5
  SHA512:
6
- metadata.gz: fa58f86e6961f6def26fcfc95943e3569bd4312955b48e882006bbebe0a7792379b961beefcaf8cd99adae6fce205c45aecb0bac0eae36d5f089912796ef3a60
7
- data.tar.gz: a329766051d9403313108b339ad744af07cf079d739243738a8bcb77e761c035a912c7d62d6209c81f6b1234b1ea6443f102c879a07f0ffe36ec5bcdbde87bf4
6
+ metadata.gz: a8c51d191a74b692f95b967a47410c67649f92c1a7358a9a8db73459cdfbc59d1c705b79286be5f387db47cc66abde2e92a8fab8296f80013482b80c8d16748e
7
+ data.tar.gz: a29c8bab6634817201f6a547b411780f5202adccdabe14db135888670858ba0619c1aa8b5620351b38c4e4322cf96d1ecd6ba83881f31d862df88750b00540b5
data/CHANGELOG.md CHANGED
@@ -1,6 +1,16 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.50.0 (2023-11-22)
5
+ ------------------
6
+
7
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
8
+
9
+ 1.49.1 (2023-11-15)
10
+ ------------------
11
+
12
+ * Issue - Pass provided `logins` when a `CognitoIdentityCredentials` client is created (#2941).
13
+
4
14
  1.49.0 (2023-09-27)
5
15
  ------------------
6
16
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.49.0
1
+ 1.50.0
@@ -1668,7 +1668,7 @@ module Aws::CognitoIdentity
1668
1668
  params: params,
1669
1669
  config: config)
1670
1670
  context[:gem_name] = 'aws-sdk-cognitoidentity'
1671
- context[:gem_version] = '1.49.0'
1671
+ context[:gem_version] = '1.50.0'
1672
1672
  Seahorse::Client::Request.new(handlers, context)
1673
1673
  end
1674
1674
 
@@ -23,7 +23,7 @@ module Aws
23
23
  #
24
24
  # ## Refreshing Credentials from Identity Service
25
25
  #
26
- # The CognitoIdentityCredentials will auto-refresh the AWS credentials from
26
+ # The `CognitoIdentityCredentials` will auto-refresh the AWS credentials from
27
27
  # Cognito. In addition to AWS credentials expiring after a given amount of
28
28
  # time, the login token from the identity provider will also expire.
29
29
  # Once this token expires, it will not be usable to refresh AWS credentials,
@@ -32,19 +32,18 @@ module Aws
32
32
  # supported by most identity providers. Consult the documentation for
33
33
  # the identity provider for refreshing tokens. Once the refreshed token is
34
34
  # acquired, you should make sure to update this new token in the
35
- # CognitoIdentityCredentials object's {logins} property. The following
35
+ # `CognitoIdentityCredentials` object's {logins} property. The following
36
36
  # code will update the WebIdentityToken, assuming you have retrieved
37
37
  # an updated token from the identity provider:
38
38
  #
39
- # AWS.config.credentials.logins['graph.facebook.com'] = updatedToken;
40
- # AWS.config.credentials.refresh! # required only if authentication state has changed
39
+ # cognito_credentials.logins['graph.facebook.com'] = updatedToken;
40
+ # cognito_credentials.refresh! # required only if authentication state has changed
41
41
  #
42
- # The CognitoIdentityCredentials also provides a `before_refresh` callback
42
+ # The `CognitoIdentityCredentials` also provides a `before_refresh` callback
43
43
  # that can be used to help manage refreshing identity provider tokens.
44
44
  # `before_refresh` is called when AWS credentials are required and need
45
45
  # to be refreshed and it has access to the CognitoIdentityCredentials object.
46
46
  class CognitoIdentityCredentials
47
-
48
47
  include CredentialProvider
49
48
  include RefreshingCredentials
50
49
 
@@ -54,8 +53,8 @@ module Aws
54
53
  # identifier in the format REGION:GUID
55
54
  #
56
55
  # @option options [String] :identity_pool_id Required unless identity_id
57
- # is provided. A Amazon Cognito
58
- # Identity Pool ID)in the format REGION:GUID.
56
+ # is provided. An Amazon Cognito Identity Pool ID in the
57
+ # format REGION:GUID.
59
58
  #
60
59
  # @option options [Hash<String,String>] :logins A set of optional
61
60
  # name-value pairs that map provider names to provider tokens.
@@ -69,16 +68,15 @@ module Aws
69
68
  # that do not support role customization.
70
69
  #
71
70
  # @option options [Callable] before_refresh Proc called before
72
- # credentials are refreshed from Cognito. Useful for updating logins/
73
- # auth tokens. `before_refresh` is called when AWS credentials are
74
- # required and need to be refreshed. Login tokens can be refreshed using
75
- # the following example:
71
+ # credentials are refreshed from Cognito. `before_refresh` is called
72
+ # when AWS credentials are required and need to be refreshed.
73
+ # Login tokens can be refreshed using the following example:
76
74
  #
77
75
  # before_refresh = Proc.new do |cognito_credentials| do
78
76
  # cognito_credentials.logins['graph.facebook.com'] = update_token
79
77
  # end
80
78
  #
81
- # @option options [STS::CognitoIdentity] :client Optional CognitoIdentity
79
+ # @option options [CognitoIdentity::Client] :client Optional CognitoIdentity
82
80
  # client. If not provided, a client will be constructed.
83
81
  def initialize(options = {})
84
82
  @identity_pool_id = options.delete(:identity_pool_id)
@@ -88,9 +86,9 @@ module Aws
88
86
  @async_refresh = false
89
87
 
90
88
  client_opts = {}
91
- options.each_pair { |k,v| client_opts[k] = v unless CLIENT_EXCLUDE_OPTIONS.include?(k) }
89
+ options.each_pair { |k, v| client_opts[k] = v unless CLIENT_EXCLUDE_OPTIONS.include?(k) }
92
90
 
93
- if !@identity_pool_id && !@identity_id
91
+ unless @identity_pool_id || @identity_id
94
92
  raise ArgumentError,
95
93
  'Must provide either identity_pool_id or identity_id'
96
94
  end
@@ -109,19 +107,21 @@ module Aws
109
107
 
110
108
  # @return [String]
111
109
  def identity_id
112
- @identity_id ||= @client
113
- .get_id(identity_pool_id: @identity_pool_id)
114
- .identity_id
110
+ @identity_id ||= @client.get_id(
111
+ identity_pool_id: @identity_pool_id,
112
+ logins: @logins
113
+ ).identity_id
115
114
  end
116
115
 
117
116
  private
118
117
 
119
118
  def refresh
120
- @before_refresh.call(self) if @before_refresh
119
+ @before_refresh&.call(self)
121
120
 
122
121
  resp = @client.get_credentials_for_identity(
123
122
  identity_id: identity_id,
124
- custom_role_arn: @custom_role_arn
123
+ custom_role_arn: @custom_role_arn,
124
+ logins: @logins
125
125
  )
126
126
 
127
127
  @credentials = Credentials.new(
@@ -134,4 +134,3 @@ module Aws
134
134
  end
135
135
  end
136
136
  end
137
-
@@ -52,6 +52,6 @@ require_relative 'aws-sdk-cognitoidentity/customizations'
52
52
  # @!group service
53
53
  module Aws::CognitoIdentity
54
54
 
55
- GEM_VERSION = '1.49.0'
55
+ GEM_VERSION = '1.50.0'
56
56
 
57
57
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-cognitoidentity
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.49.0
4
+ version: 1.50.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-27 00:00:00.000000000 Z
11
+ date: 2023-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '3'
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 3.184.0
22
+ version: 3.188.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '3'
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 3.184.0
32
+ version: 3.188.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: aws-sigv4
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -81,7 +81,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
81
81
  requirements:
82
82
  - - ">="
83
83
  - !ruby/object:Gem::Version
84
- version: '2.3'
84
+ version: '2.5'
85
85
  required_rubygems_version: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - ">="