2024-01-03 17:59:04 +00:00
|
|
|
package stirling.software.SPDF.controller.web;
|
|
|
|
|
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
|
import org.springframework.ui.Model;
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
|
|
|
|
import io.swagger.v3.oas.annotations.Hidden;
|
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
|
|
|
|
|
@Controller
|
|
|
|
@Tag(name = "Security", description = "Security APIs")
|
|
|
|
public class SecurityWebController {
|
|
|
|
|
|
|
|
@GetMapping("/auto-redact")
|
|
|
|
@Hidden
|
|
|
|
public String autoRedactForm(Model model) {
|
|
|
|
model.addAttribute("currentPage", "auto-redact");
|
|
|
|
return "security/auto-redact";
|
|
|
|
}
|
|
|
|
|
2025-01-06 13:38:44 +02:00
|
|
|
@GetMapping("/redact")
|
|
|
|
public String redactForm(Model model) {
|
|
|
|
model.addAttribute("currentPage", "redact");
|
|
|
|
return "security/redact";
|
|
|
|
}
|
|
|
|
|
2024-01-03 17:59:04 +00:00
|
|
|
@GetMapping("/add-password")
|
|
|
|
@Hidden
|
|
|
|
public String addPasswordForm(Model model) {
|
|
|
|
model.addAttribute("currentPage", "add-password");
|
|
|
|
return "security/add-password";
|
|
|
|
}
|
|
|
|
|
|
|
|
@GetMapping("/change-permissions")
|
|
|
|
@Hidden
|
|
|
|
public String permissionsForm(Model model) {
|
|
|
|
model.addAttribute("currentPage", "change-permissions");
|
|
|
|
return "security/change-permissions";
|
|
|
|
}
|
|
|
|
|
|
|
|
@GetMapping("/remove-password")
|
|
|
|
@Hidden
|
|
|
|
public String removePasswordForm(Model model) {
|
|
|
|
model.addAttribute("currentPage", "remove-password");
|
|
|
|
return "security/remove-password";
|
|
|
|
}
|
|
|
|
|
|
|
|
@GetMapping("/add-watermark")
|
|
|
|
@Hidden
|
|
|
|
public String addWatermarkForm(Model model) {
|
|
|
|
model.addAttribute("currentPage", "add-watermark");
|
|
|
|
return "security/add-watermark";
|
|
|
|
}
|
|
|
|
|
|
|
|
@GetMapping("/cert-sign")
|
|
|
|
@Hidden
|
|
|
|
public String certSignForm(Model model) {
|
|
|
|
model.addAttribute("currentPage", "cert-sign");
|
|
|
|
return "security/cert-sign";
|
|
|
|
}
|
|
|
|
|
2024-12-05 15:56:22 +00:00
|
|
|
@GetMapping("/validate-signature")
|
|
|
|
@Hidden
|
|
|
|
public String certSignVerifyForm(Model model) {
|
|
|
|
model.addAttribute("currentPage", "validate-signature");
|
|
|
|
return "security/validate-signature";
|
|
|
|
}
|
|
|
|
|
2024-05-31 11:31:07 +02:00
|
|
|
@GetMapping("/remove-cert-sign")
|
|
|
|
@Hidden
|
|
|
|
public String certUnSignForm(Model model) {
|
|
|
|
model.addAttribute("currentPage", "remove-cert-sign");
|
|
|
|
return "security/remove-cert-sign";
|
|
|
|
}
|
|
|
|
|
2024-01-03 17:59:04 +00:00
|
|
|
@GetMapping("/sanitize-pdf")
|
|
|
|
@Hidden
|
|
|
|
public String sanitizeForm(Model model) {
|
|
|
|
model.addAttribute("currentPage", "sanitize-pdf");
|
|
|
|
return "security/sanitize-pdf";
|
|
|
|
}
|
|
|
|
|
|
|
|
@GetMapping("/get-info-on-pdf")
|
|
|
|
@Hidden
|
|
|
|
public String getInfo(Model model) {
|
|
|
|
model.addAttribute("currentPage", "get-info-on-pdf");
|
|
|
|
return "security/get-info-on-pdf";
|
|
|
|
}
|
|
|
|
}
|