gds-api-adapters 75.3.0 → 76.0.0
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 +4 -4
- data/lib/gds_api/account_api.rb +1 -3
- data/lib/gds_api/test_helpers/account_api.rb +3 -5
- data/lib/gds_api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c6fbbdd523fc7bf5afd6d23497c1adffa0c61d5cc0d836f377e7f836164cb886
|
4
|
+
data.tar.gz: cfeb1598eb0ef9409be473c362f682d72c0b4e26ba0889b596bb037a8327593f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc9c4199017d1f929c9a061767585ffc8dc4d49dcb70606f7e32336683f4061be6e00f1c265aed8c9f52a0761028f4da35527abccf30d5a3b8ebe98c2991eb34
|
7
|
+
data.tar.gz: 9d87aa59e50a159dac97564245334a132b6550bd946eace9260177882bafee15a82e1992fe7fb99708fdaf813c0f723fb15e971660315b58c5e309f5eaf073de
|
data/lib/gds_api/account_api.rb
CHANGED
@@ -75,16 +75,14 @@ class GdsApi::AccountApi < GdsApi::Base
|
|
75
75
|
# @param [String] subject_identifier The identifier of the user, shared between the auth service and GOV.UK.
|
76
76
|
# @param [String, nil] email The user's current email address
|
77
77
|
# @param [Boolean, nil] email_verified Whether the user's current email address is verified
|
78
|
-
# @param [Boolean, nil] has_unconfirmed_email Whether the user has a new, pending, email address
|
79
78
|
# @param [Boolean, nil] cookie_consent Whether the user has consented to analytics cookies
|
80
79
|
# @param [Boolean, nil] feedback_consent Whether the user has consented to being contacted for feedback
|
81
80
|
#
|
82
81
|
# @return [Hash] The user's subject identifier and email attributes
|
83
|
-
def update_user_by_subject_identifier(subject_identifier:, email: nil, email_verified: nil,
|
82
|
+
def update_user_by_subject_identifier(subject_identifier:, email: nil, email_verified: nil, cookie_consent: nil, feedback_consent: nil)
|
84
83
|
params = {
|
85
84
|
email: email,
|
86
85
|
email_verified: email_verified,
|
87
|
-
has_unconfirmed_email: has_unconfirmed_email,
|
88
86
|
cookie_consent: cookie_consent,
|
89
87
|
feedback_consent: feedback_consent,
|
90
88
|
}.compact
|
@@ -69,7 +69,7 @@ module GdsApi
|
|
69
69
|
###############
|
70
70
|
# GET /api/user
|
71
71
|
###############
|
72
|
-
def stub_account_api_user_info(id: "user-id", mfa: false, email: "email@example.com", email_verified: true,
|
72
|
+
def stub_account_api_user_info(id: "user-id", mfa: false, email: "email@example.com", email_verified: true, services: {}, **options)
|
73
73
|
stub_account_api_request(
|
74
74
|
:get,
|
75
75
|
"/api/user",
|
@@ -78,7 +78,6 @@ module GdsApi
|
|
78
78
|
mfa: mfa,
|
79
79
|
email: email,
|
80
80
|
email_verified: email_verified,
|
81
|
-
has_unconfirmed_email: has_unconfirmed_email,
|
82
81
|
services: services,
|
83
82
|
},
|
84
83
|
**options,
|
@@ -160,16 +159,15 @@ module GdsApi
|
|
160
159
|
###########################################
|
161
160
|
# PATCH /api/oidc-users/:subject_identifier
|
162
161
|
###########################################
|
163
|
-
def stub_update_user_by_subject_identifier(subject_identifier:, email: nil, email_verified: nil,
|
162
|
+
def stub_update_user_by_subject_identifier(subject_identifier:, email: nil, email_verified: nil, cookie_consent: nil, feedback_consent: nil, old_email: nil, old_email_verified: nil, old_cookie_consent: nil, old_feedback_consent: nil)
|
164
163
|
stub_account_api_request(
|
165
164
|
:patch,
|
166
165
|
"/api/oidc-users/#{subject_identifier}",
|
167
|
-
with: { body: hash_including({ email: email, email_verified: email_verified,
|
166
|
+
with: { body: hash_including({ email: email, email_verified: email_verified, cookie_consent: cookie_consent, feedback_consent: feedback_consent }.compact) },
|
168
167
|
response_body: {
|
169
168
|
sub: subject_identifier,
|
170
169
|
email: email || old_email,
|
171
170
|
email_verified: email_verified || old_email_verified,
|
172
|
-
has_unconfirmed_email: has_unconfirmed_email || old_has_unconfirmed_email,
|
173
171
|
cookie_consent: cookie_consent || old_cookie_consent,
|
174
172
|
feedback_consent: feedback_consent || old_feedback_consent,
|
175
173
|
},
|
data/lib/gds_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gds-api-adapters
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 76.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GOV.UK Dev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|