|
12 | 12 | import access.manage.RequestType; |
13 | 13 | import access.model.Authority; |
14 | 14 | import access.model.ConnectionRequest; |
| 15 | +import access.model.DisconnectionRequest; |
15 | 16 | import access.model.EntityType; |
16 | 17 | import access.model.Environment; |
17 | 18 | import access.model.Organization; |
@@ -180,17 +181,17 @@ public ResponseEntity<Map<String, Object>> connect(User user, @RequestBody @Vali |
180 | 181 | } |
181 | 182 |
|
182 | 183 | @PutMapping({"/disconnect"}) |
183 | | - public ResponseEntity<Map<String, Object>> disconnect(User user, @RequestBody @Validated ConnectionRequest connectionRequest) { |
| 184 | + public ResponseEntity<Map<String, Object>> disconnect(User user, @RequestBody @Validated DisconnectionRequest disconnectionRequest) { |
184 | 185 | LOG.debug("/disconnect SP to IdP request by " + user.getEmail()); |
185 | 186 |
|
186 | 187 | user = reinitializeUser(user, userRepository); |
187 | 188 |
|
188 | | - String idpManageIdentifier = connectionRequest.getIdpManageIdentifier(); |
| 189 | + String idpManageIdentifier = disconnectionRequest.getIdpManageIdentifier(); |
189 | 190 | Organization organization = organizationRepository.findByManageIdentifier(idpManageIdentifier) |
190 | 191 | .orElseThrow(() -> new NotFoundException("Organization with manageIdentifier not found: " + idpManageIdentifier)); |
191 | 192 |
|
192 | | - Map<String, Object> serviceProvider = manage.providerById(connectionRequest.getEntityType(), |
193 | | - connectionRequest.getApplicationManageIdentifier(), Environment.PROD); |
| 193 | + Map<String, Object> serviceProvider = manage.providerById(disconnectionRequest.getEntityType(), |
| 194 | + disconnectionRequest.getApplicationManageIdentifier(), Environment.PROD); |
194 | 195 |
|
195 | 196 | confirmOrganizationMembership(user, organization, Authority.ADMIN); |
196 | 197 | Map<String, Object> identityProvider = manage.providerById(EntityType.saml20_idp, idpManageIdentifier, Environment.PROD); |
|
0 commit comments