uc3-dmp-provenance 0.0.9 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8b248054cb3c84cd6befad733c0239ca005216354f165e512bf09660850f894c
4
- data.tar.gz: 24596ac4f42da2dcbc859e9f58d790d2ea8eafec1691eba9711c20ecdfc9bfca
3
+ metadata.gz: 7f3c04c49849d18304637068691a2f26810e166ab70b7ea737c022eaf0f75b55
4
+ data.tar.gz: 433da4633800604a21914bacf6d1eac8504fd58ae6a32db03f6a5e752f38e4b0
5
5
  SHA512:
6
- metadata.gz: 15195f0efcc76a6632ad521a182eb2d9e3ffefa57d53c9649e39d3a94212423dd04823e542a9eff83e78f6cab328ea10ef822bc63cda3d9fdab46cf679428ff7
7
- data.tar.gz: d6f94292832fa83ccc5f0a1ddb976a5f2a95cd1db026ea508e8a03465a3ffc66846182a3a4e07009fa75a3e3faa589309824ac8c53279914e07c5a2d77b05b05
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
@@ -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.10'
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.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley