Package sk.iway.iwcm.users.devices
Class AdminDeviceRestController
java.lang.Object
sk.iway.iwcm.users.devices.AdminDeviceRestController
@RestController
@RequestMapping("/admin/rest/security/login-events")
@PreAuthorize("@WebjetSecurityService.isAdmin()")
public class AdminDeviceRestController
extends Object
Account-owned device listing and security actions; notice details also arrive with the overview page.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconfirm(String id, AdminDeviceRestController.Confirmation proof, jakarta.servlet.http.HttpServletRequest request) Requires exactly one email proof in addition to the authenticated account.org.springframework.data.domain.Page<DeviceEntity>devices(jakarta.servlet.http.HttpServletRequest request, int page) Lists only the signed-in account's devices, ignoring client-supplied ownership, size and sorting.Blocks the reported browser and signs out its known sessions.voidrequestCode(String id, jakarta.servlet.http.HttpServletRequest request) Sends a code to the authenticated account's email, never a client-supplied address.voidunavailable(IllegalStateException exception) Returns HTTP 503 instead of the default 500.jsp, which changes the status to 404 and can expose exception details to administrators.
-
Constructor Details
-
AdminDeviceRestController
-
-
Method Details
-
devices
@GetMapping public org.springframework.data.domain.Page<DeviceEntity> devices(jakarta.servlet.http.HttpServletRequest request, @RequestParam(value="page",defaultValue="0") int page) Lists only the signed-in account's devices, ignoring client-supplied ownership, size and sorting. -
requestCode
@PostMapping("/{id}/code") @ResponseStatus(NO_CONTENT) public void requestCode(@PathVariable("id") String id, jakarta.servlet.http.HttpServletRequest request) Sends a code to the authenticated account's email, never a client-supplied address. -
confirm
@PostMapping("/{id}/confirm") public DeviceEntity confirm(@PathVariable("id") String id, @RequestBody AdminDeviceRestController.Confirmation proof, jakarta.servlet.http.HttpServletRequest request) Requires exactly one email proof in addition to the authenticated account. -
report
@PostMapping("/{id}/report") public DeviceEntity report(@PathVariable("id") String id, jakarta.servlet.http.HttpServletRequest request) Blocks the reported browser and signs out its known sessions.
-