uc3-dmp-provenance 0.0.9 → 0.0.11

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: 8b248054cb3c84cd6befad733c0239ca005216354f165e512bf09660850f894c
4
- data.tar.gz: 24596ac4f42da2dcbc859e9f58d790d2ea8eafec1691eba9711c20ecdfc9bfca
3
+ metadata.gz: c6a82bbb7e1b2b0e5e6e7a917a1d5356cdf0d73b63f5c9a61b3423093aa09c2d
4
+ data.tar.gz: 682482122e0cd16c5ec9dd1d15656c9107dc50af912d33aeef6232af6e9d5bf3
5
5
  SHA512:
6
- metadata.gz: 15195f0efcc76a6632ad521a182eb2d9e3ffefa57d53c9649e39d3a94212423dd04823e542a9eff83e78f6cab328ea10ef822bc63cda3d9fdab46cf679428ff7
7
- data.tar.gz: d6f94292832fa83ccc5f0a1ddb976a5f2a95cd1db026ea508e8a03465a3ffc66846182a3a4e07009fa75a3e3faa589309824ac8c53279914e07c5a2d77b05b05
6
+ metadata.gz: 0a51d2021d22d798d024a23b7c88a7f6142afaf163d68b296e0237d7d6fe486400cca32876c2250beef798439fff547ef38c85caa1737c82a35de16c6e2031a2
7
+ data.tar.gz: ae852a0a5d87de997f9b76e293fa225c00fa4eba0e358f2aca62d69344cd6acb6038fdef250dba5d55746432571bd3b64227712080faa40bbbbcd0289c2c6e43
@@ -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: nil)
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpProvenance
4
- VERSION = '0.0.9'
4
+ VERSION = '0.0.11'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uc3-dmp-provenance
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley