class KeysApiController implements KeysApi {

    @Override
    @PreAuthorize("hasAuthority('DELETE_AUTH_CERT') or hasAuthority('DELETE_SIGN_CERT')")
    @AuditEventMethod(event = DELETE_CSR)
    public ResponseEntity<Void> deleteCsr(String keyId, String csrId) {
        try {
            tokenCertificateService.deleteCsr(csrId);
        } catch (KeyNotFoundException | CsrNotFoundException e) {
            throw new ResourceNotFoundException(e);
        } catch (ActionNotPossibleException e) {
            throw new ConflictException(e);
        }
        return new ResponseEntity<>(HttpStatus.NO_CONTENT);
    }

    @Autowired public  KeysApiController(KeyService keyService,
            KeyConverter keyConverter,
            ClientConverter clientConverter,
            TokenCertificateService tokenCertificateService,
            ServerConfService serverConfService,
            CsrFilenameCreator csrFilenameCreator,
            PossibleActionConverter possibleActionConverter);

}