aws-sdk-cognitoidentity 1.48.0 → 1.49.1

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: '0108abe848aa6219b352d7372179cea8d0aec52cebc8a48c2c2d76c2bff57bed'
4
- data.tar.gz: 2ef81aada624ae076e93a13cfe92f1c5a6e1d3050238e9d3dcbae08abd2d52d1
3
+ metadata.gz: 4b8f42ec184b1ee1c18b4f548682502a9ab5a5986d2871a85ed4b2faf333368f
4
+ data.tar.gz: b8eea9a955ad7cdda3e0a952a85ca1d583c7b088f1ecdb03a093245654ef2577
5
5
  SHA512:
6
- metadata.gz: 0c1e5c03ff1fb4a6a53d45130859fc05404f67d8d09ea662acd86e2d6179e91741c87d8f2787ed3882c059012a1d93d66452653df12536dff97f845ea5906f92
7
- data.tar.gz: 186894cf7db3dfacf673376a7b80deb0cc91406c2050a06c47f86af323731c2469b5a8c82e06d4012e6527d68a7cf17bb535fa6d806121c8abd0a413f453ddb2
6
+ metadata.gz: 8f3705550a899aadcf245e5297a579366ee06ad75e8b1a2c9b0e9d0323657e258aaacd0768dfa3fdd33c0bbaa0dc99557cbe061f4bf9ba939f26f2233176dd14
7
+ data.tar.gz: 5eb2f0b1a78b5c2e82a70471e4578313dce62e8d68a5ad19da8a8a8f3fbfda9af7248c5fa159217deea2e2cd6d7455e8185c222c0c228fd752310815751a44da
data/CHANGELOG.md CHANGED
@@ -1,6 +1,16 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.49.1 (2023-11-15)
5
+ ------------------
6
+
7
+ * Issue - Pass provided `logins` when a `CognitoIdentityCredentials` client is created (#2941).
8
+
9
+ 1.49.0 (2023-09-27)
10
+ ------------------
11
+
12
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
13
+
4
14
  1.48.0 (2023-09-19)
5
15
  ------------------
6
16
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.48.0
1
+ 1.49.1
@@ -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.48.0'
1671
+ context[:gem_version] = '1.49.1'
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.48.0'
55
+ GEM_VERSION = '1.49.1'
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.48.0
4
+ version: 1.49.1
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-19 00:00:00.000000000 Z
11
+ date: 2023-11-15 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.177.0
22
+ version: 3.184.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.177.0
32
+ version: 3.184.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: aws-sigv4
35
35
  requirement: !ruby/object:Gem::Requirement