Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
package com.wallet.secure.audit.controller;

import com.wallet.secure.audit.dto.AuditLogResponse;
import com.wallet.secure.audit.entity.AuditLog;
import com.wallet.secure.audit.repository.AuditLogRepository;
import com.wallet.secure.common.enums.AuditAction;
import com.wallet.secure.common.enums.LogSeverity;
import com.wallet.secure.common.response.ApiResponse;
import jakarta.validation.constraints.Size;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.support.PageableExecutionUtils;
import org.springframework.data.web.PageableDefault;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import io.swagger.v3.oas.annotations.tags.Tag;

import java.time.Instant;
import java.time.LocalDate;
Expand Down Expand Up @@ -55,6 +52,7 @@
@RequestMapping("/audit")
@RequiredArgsConstructor
@Log4j2
@Tag(name = "7. Audit Logs", description = "Security audit trail — ADMIN only")
@PreAuthorize("hasRole('ADMIN')")
public class AuditController {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.v3.oas.annotations.tags.Tag;

/**
* REST Controller for authentication endpoints.
Expand All @@ -39,6 +40,7 @@
@RequestMapping("/auth")
@RequiredArgsConstructor
@Log4j2
@Tag(name = "1. Authentication", description = "Register, login, logout and token refresh — public endpoints")
public class AuthController {

private final AuthService authService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import org.springframework.security.core.annotation.AuthenticationPrincipal;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.web.bind.annotation.*;
import io.swagger.v3.oas.annotations.tags.Tag;

import java.util.List;
import java.util.UUID;
Expand Down Expand Up @@ -48,6 +49,7 @@
@RequestMapping("/sessions")
@RequiredArgsConstructor
@Log4j2
@Tag(name = "2. Sessions", description = "Multi-device session management — see and revoke active sessions")
public class SessionController {

private final SessionService sessionService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import org.springframework.security.core.annotation.AuthenticationPrincipal;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.web.bind.annotation.*;
import io.swagger.v3.oas.annotations.tags.Tag;

import java.util.UUID;

Expand Down Expand Up @@ -47,6 +48,7 @@
@RequestMapping("/transactions")
@RequiredArgsConstructor
@Log4j2
@Tag(name = "5. Transactions", description = "Deposit, withdraw and transfer funds between wallets")
public class TransactionController {

private final TransactionService transactionService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import org.springframework.security.core.annotation.AuthenticationPrincipal;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.web.bind.annotation.*;
import io.swagger.v3.oas.annotations.tags.Tag;

import java.util.List;
import java.util.UUID;
Expand Down Expand Up @@ -51,6 +52,7 @@
@RestController
@RequiredArgsConstructor
@Log4j2
@Tag(name = "6. Transaction History", description = "Complete state timeline for each transaction — PENDING → PROCESSING → COMPLETED/FAILED")
public class TransactionHistoryController {

private final TransactionHistoryService historyService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import org.springframework.security.core.annotation.AuthenticationPrincipal;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.web.bind.annotation.*;
import io.swagger.v3.oas.annotations.tags.Tag;

import java.util.UUID;

Expand All @@ -34,6 +35,7 @@
@RequestMapping("/users")
@RequiredArgsConstructor
@Log4j2
@Tag(name = "3. Users", description = "User profile, password change and account management")
public class UserController {

private final UserService userService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import org.springframework.security.core.annotation.AuthenticationPrincipal;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.web.bind.annotation.*;
import io.swagger.v3.oas.annotations.tags.Tag;

import java.util.List;
import java.util.UUID;
Expand Down Expand Up @@ -41,6 +42,7 @@
@RequestMapping("/wallets")
@RequiredArgsConstructor
@Log4j2
@Tag(name = "4. Wallets", description = "Create and manage multi-currency digital wallets")
public class WalletController {

private final WalletService walletService;
Expand Down
Loading