uc3-dmp-provenance 0.0.9 → 0.0.10
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-provenance/finder.rb +3 -3
- data/lib/uc3-dmp-provenance/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f3c04c49849d18304637068691a2f26810e166ab70b7ea737c022eaf0f75b55
|
4
|
+
data.tar.gz: 433da4633800604a21914bacf6d1eac8504fd58ae6a32db03f6a5e752f38e4b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d765064e920be446870ef106e514db1906e08d85436abeb44431d73ff9aa4076c8aac9813637424a2ef5032ea153eb2b38ac5b86d2b6217e8f3953c2ebff758e
|
7
|
+
data.tar.gz: 90eadd20dd60a51b6d11e58fef2b1590b2a80fcc4d00a4db1e3807c61e04de4d0a515df36da8bb816a618a1fd3b65ae08886cb0ba7526cc45fedee870a222b38
|
@@ -31,7 +31,7 @@ module Uc3DmpProvenance
|
|
31
31
|
return nil unless identity.is_a?(Hash) && !identity['iss'].nil? && !identity['client_id'].nil?
|
32
32
|
|
33
33
|
client = Uc3DmpDynamo::Client.new
|
34
|
-
client_name = _cognito_client_id_to_name(claim: identity)
|
34
|
+
client_name = _cognito_client_id_to_name(claim: identity, logger: logger)
|
35
35
|
|
36
36
|
resp = client.get_item(
|
37
37
|
key: { PK: Helper.append_pk_prefix(provenance: client_name), SK: Helper::SK_PROVENANCE_PREFIX },
|
@@ -43,7 +43,7 @@ module Uc3DmpProvenance
|
|
43
43
|
# Fetch the Provenance by it's PK.
|
44
44
|
#
|
45
45
|
# Expecting either the name (e.g. `dmptool` or the qualified PK (e.g. `PROVENANCE#dmptool`)
|
46
|
-
def from_pk(pk:)
|
46
|
+
def from_pk(pk:, logger: logger)
|
47
47
|
return nil if pk.nil?
|
48
48
|
|
49
49
|
pk = Helper.append_pk_prefix(provenance: pk)
|
@@ -57,7 +57,7 @@ module Uc3DmpProvenance
|
|
57
57
|
private
|
58
58
|
|
59
59
|
# Method to fetch the client's name from the Cognito UserPool based on the client_id
|
60
|
-
def _cognito_client_id_to_name(claim:)
|
60
|
+
def _cognito_client_id_to_name(claim:, logger: nil)
|
61
61
|
return nil if claim.nil? || !claim.is_a?(Hash) || claim['iss'].nil? || claim['client_id'].nil?
|
62
62
|
|
63
63
|
user_pool_id = claim['iss'].split('/').last
|