gds-api-adapters 72.0.0 → 72.1.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 +7 -0
- data/lib/gds_api/test_helpers/account_api.rb +20 -0
- 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: 51407d1cee42f0e1fbdf73f71f91f8e2b179adb56b81a9737ce26e334084644a
|
|
4
|
+
data.tar.gz: e8d397558f602abf5989795c92a2ec62880f0919d72897fde2e8e0ce83af2cdc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 64ea0ab0af3fd9e4f4fe99a8bd8eab5179dc8216a2c45f4e76691150eaf8421d89ba197f923e56246ed5ed1292c49c5697e0c6c56043702e0a0cf1defd0fa402
|
|
7
|
+
data.tar.gz: 5a04715d1b8711171adb7d34cafc0f5f4ac499cf5157563c9f39c4fe949fef397ddbc1eab7a40eb9e5f355154cec76ff5b892d7f238515747390a3cb8ec82b3f
|
data/lib/gds_api/account_api.rb
CHANGED
|
@@ -43,6 +43,13 @@ class GdsApi::AccountApi < GdsApi::Base
|
|
|
43
43
|
get_json("#{endpoint}/api/user", auth_headers(govuk_account_session))
|
|
44
44
|
end
|
|
45
45
|
|
|
46
|
+
# Delete a users account
|
|
47
|
+
#
|
|
48
|
+
# @param [String] subject_identifier The identifier of the user, shared between the auth service and GOV.UK.
|
|
49
|
+
def delete_user_by_subject_identifier(subject_identifier:)
|
|
50
|
+
delete_json("#{endpoint}/api/oidc-users/#{subject_identifier}")
|
|
51
|
+
end
|
|
52
|
+
|
|
46
53
|
# Update the user record with privileged information from the auth service. Only the auth service will call this.
|
|
47
54
|
#
|
|
48
55
|
# @param [String] subject_identifier The identifier of the user, shared between the auth service and GOV.UK.
|
|
@@ -82,6 +82,26 @@ module GdsApi
|
|
|
82
82
|
)
|
|
83
83
|
end
|
|
84
84
|
|
|
85
|
+
############################################
|
|
86
|
+
# DELETE /api/oidc-users/:subject_identifier
|
|
87
|
+
############################################
|
|
88
|
+
|
|
89
|
+
def stub_account_api_delete_user_by_subject_identifier(subject_identifier:)
|
|
90
|
+
stub_account_api_request(
|
|
91
|
+
:delete,
|
|
92
|
+
"/api/oidc-users/#{subject_identifier}",
|
|
93
|
+
response_status: 204,
|
|
94
|
+
)
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
def stub_account_api_delete_user_by_subject_identifier_does_not_exist(subject_identifier:)
|
|
98
|
+
stub_account_api_request(
|
|
99
|
+
:delete,
|
|
100
|
+
"/api/oidc-users/#{subject_identifier}",
|
|
101
|
+
response_status: 404,
|
|
102
|
+
)
|
|
103
|
+
end
|
|
104
|
+
|
|
85
105
|
###########################################
|
|
86
106
|
# PATCH /api/oidc-users/:subject_identifier
|
|
87
107
|
###########################################
|
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: 72.
|
|
4
|
+
version: 72.1.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-07-
|
|
11
|
+
date: 2021-07-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: addressable
|