uc3-dmp-cognito 0.0.6 → 0.0.8

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: 2a0f0a88d3609e7f110d0fd61bc4e40f40249f434bcd6744bb8b035e29e2c689
4
- data.tar.gz: f020b461f3cfc76732a472819850b43ff2987c7b14bc4308c5c992d30a2f27e9
3
+ metadata.gz: 36cda206556b047c5fa0af771628c0e6496e779f3240390ebafcd4ac6fa40271
4
+ data.tar.gz: e6548d20b8fa97a20affadf58040904fc23e1dd95b668ee341ff605e1d55b37a
5
5
  SHA512:
6
- metadata.gz: fa1427c6c31afcd0416e7fe1fef90d764a66c843e420f620086c480b05c19c1a9f51547537492e2abc28817a15f7462b700094c3308a005e71fa86dd62214abb
7
- data.tar.gz: '0867424c8e0197afd500e98c11f0782c93847a29e5f0b96f13ab53a2f77aefb778f03c01d0c545f9d77c204aaa6bf834b6cc197da9943a4a1a2b69b8eeb5231c'
6
+ metadata.gz: e31e9114d87a2c7cd31673978a26990ae3e4a65e209418445a1dcb03a6e4e49c7239c83e841ed33a37a8936e1658da7d54fee147ffcd2f1b74581e6c1a8f1800
7
+ data.tar.gz: 3134087907af45d871fbe6bf4cfad48ee3684304c17b314313ac817e0bb68b6cc8f1969bf763cf0ebb1aa7a96dac67816752fa04d9453d9e9a5a7ab7b0f8ad8a
@@ -11,12 +11,13 @@ module Uc3DmpCognito
11
11
  class << self
12
12
  # Fetch the name of the client from the client id provided.
13
13
  # DMP Provenance names match the Cognito client names
14
+ # rubocop:disable Metrics/AbcSize
14
15
  def get_client_name(client_id:, logger: nil)
15
16
  user_pool_id = ENV.fetch('COGNITO_USER_POOL_ID', nil)
16
17
  raise ClientError, MSG_MISSING_POOL if user_pool_id.nil?
17
18
 
18
19
  client = Aws::CognitoIdentityProvider::Client.new(region: ENV.fetch('AWS_REGION', nil))
19
- resp = client.describe_user_pool_client({ user_pool_id: user_pool_id, client_id: client_id })
20
+ resp = client.describe_user_pool_client({ user_pool_id:, client_id: })
20
21
  msg = "Searching for Client ID: #{client_id} in Cognito User Pool: #{user_pool_id} - found"
21
22
  logger.debug(message: "#{msg} '#{resp&.user_pool_client&.client_name&.downcase}'") if logger.respond_to?(:debug)
22
23
  resp&.user_pool_client&.client_name&.downcase
@@ -24,5 +25,6 @@ module Uc3DmpCognito
24
25
  raise ClientError, format(MSG_COGNITO_ERROR, msg: e.message, trace: e.backtrace)
25
26
  end
26
27
  end
28
+ # rubocop:enable Metrics/AbcSize
27
29
  end
28
30
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpCognito
4
- VERSION = '0.0.6'
4
+ VERSION = '0.0.8'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uc3-dmp-cognito
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-06 00:00:00.000000000 Z
11
+ date: 2024-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -110,7 +110,7 @@ licenses:
110
110
  - MIT
111
111
  metadata:
112
112
  rubygems_mfa_required: 'false'
113
- post_install_message:
113
+ post_install_message:
114
114
  rdoc_options: []
115
115
  require_paths:
116
116
  - lib
@@ -118,15 +118,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
118
118
  requirements:
119
119
  - - ">="
120
120
  - !ruby/object:Gem::Version
121
- version: '2.7'
121
+ version: '3.2'
122
122
  required_rubygems_version: !ruby/object:Gem::Requirement
123
123
  requirements:
124
124
  - - ">="
125
125
  - !ruby/object:Gem::Version
126
126
  version: '0'
127
127
  requirements: []
128
- rubygems_version: 3.1.6
129
- signing_key:
128
+ rubygems_version: 3.4.22
129
+ signing_key:
130
130
  specification_version: 4
131
131
  summary: DMPTool gem that provides support for Cognito
132
132
  test_files: []