uc3-dmp-cognito 0.0.2 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/uc3-dmp-cognito/client.rb +10 -3
- data/lib/uc3-dmp-cognito/version.rb +1 -1
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6bb0fb76241b9ffb1134b96274f3dde699c70ceac29bbc4a7216727635c62c9f
|
4
|
+
data.tar.gz: b6325d8c3aff12cbbb0e6a46617fe8572457f45af3a64dcc56ad6616fc3769c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71f399677c43f090bb91c8dd3012eb58455e24a22c64d54ce445810e9e8becc0c8b206fdd1ce45926c646acc934501e412607ccf71f89b9c92c66b3bddf65eaa
|
7
|
+
data.tar.gz: c5f1b48df773c58b630f1b0b2aa30bc09dd65e2e52c300e801f5390f71db347fc3a7239db8d28cca8e3294e596ef2d241cc003de4f9a61ae1a51b2a5ad8cc2f4
|
@@ -5,14 +5,21 @@ module Uc3DmpCognito
|
|
5
5
|
|
6
6
|
# Helper functions for working with Dynamo JSON
|
7
7
|
class Client
|
8
|
-
MSG_MISSING_POOL = 'No Cognito Pool defined. Expecting `ENV[\'
|
8
|
+
MSG_MISSING_POOL = 'No Cognito Pool defined. Expecting `ENV[\'COGNITO_USER_POOL_ID\']'
|
9
9
|
MSG_COGNITO_ERROR = 'Cognito User Pool Error - %{msg} - %{trace}'
|
10
10
|
|
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
|
-
def get_client_name(client_id:)
|
15
|
-
|
14
|
+
def get_client_name(client_id:, debug: false)
|
15
|
+
|
16
|
+
puts '----------------------------------'
|
17
|
+
puts "GEM ENV:"
|
18
|
+
puts ENV.inspect
|
19
|
+
puts ENV['COGNITO_USER_POOL_ID']
|
20
|
+
puts '----------------------------------'
|
21
|
+
|
22
|
+
user_pool_id = ENV.fetch('COGNITO_USER_POOL_ID', nil)
|
16
23
|
raise ClientError, MSG_MISSING_POOL if user_pool_id.nil?
|
17
24
|
|
18
25
|
client = Aws::CognitoIdentityProvider::Client.new(region: ENV.fetch('AWS_REGION', nil))
|
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.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Riley
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -24,20 +24,6 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '2.6'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: logger
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '1.4'
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '1.4'
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: aws-sdk-cognitoidentityprovider
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|