# Index

A B C D E F G H I J L M P R S T U V W
All Classes and Interfaces|All Packages|Serialized Form

## A

AccountLockedException - Exception Class in com.jangular.backend.exception
AccountLockedException(String) - Constructor for exception class com.jangular.backend.exception.AccountLockedException
addRoleToUser(Long, RoleName) - Method in class com.jangular.backend.service.UserService
  Add role to user
addRoleToUser(Long, Map<String, String>) - Method in class com.jangular.backend.controller.UserController
  Add role to user (admin only)
AuthController - Class in com.jangular.backend.controller
AuthController() - Constructor for class com.jangular.backend.controller.AuthController
authenticate(AuthRequest, String, String) - Method in class com.jangular.backend.service.AuthenticationService
  Authenticate user and generate JWT tokens
authenticationManager(AuthenticationConfiguration) - Method in class com.jangular.backend.config.WebSecurityConfig
AuthenticationRequest - Class in com.jangular.backend.security.model
AuthenticationRequest() - Constructor for class com.jangular.backend.security.model.AuthenticationRequest
AuthenticationRequest(String, String) - Constructor for class com.jangular.backend.security.model.AuthenticationRequest
AuthenticationResponse - Class in com.jangular.backend.security.model
AuthenticationResponse(String, String) - Constructor for class com.jangular.backend.security.model.AuthenticationResponse
AuthenticationService - Class in com.jangular.backend.service
AuthenticationService() - Constructor for class com.jangular.backend.service.AuthenticationService
AuthRequest - Class in com.jangular.backend.dto
AuthRequest() - Constructor for class com.jangular.backend.dto.AuthRequest
AuthResponse - Class in com.jangular.backend.dto
AuthResponse() - Constructor for class com.jangular.backend.dto.AuthResponse

## B

BackendApplication - Class in com.jangular.backend
BackendApplication() - Constructor for class com.jangular.backend.BackendApplication
BadCredentialsException - Exception Class in com.jangular.backend.exception
BadCredentialsException(String) - Constructor for exception class com.jangular.backend.exception.BadCredentialsException

## C

changePassword(Long, String) - Method in class com.jangular.backend.service.UserService
  Change user password
changePassword(Long, String, String) - Method in class com.jangular.backend.service.AuthenticationService
  Change user password
changePassword(Long, Map<String, String>) - Method in class com.jangular.backend.controller.UserController
  Change user password
com.jangular.backend - package com.jangular.backend
com.jangular.backend.config - package com.jangular.backend.config
com.jangular.backend.controller - package com.jangular.backend.controller
com.jangular.backend.dto - package com.jangular.backend.dto
com.jangular.backend.enums - package com.jangular.backend.enums
com.jangular.backend.exception - package com.jangular.backend.exception
com.jangular.backend.models - package com.jangular.backend.models
com.jangular.backend.repository - package com.jangular.backend.repository
com.jangular.backend.security - package com.jangular.backend.security
com.jangular.backend.security.jwt - package com.jangular.backend.security.jwt
com.jangular.backend.security.model - package com.jangular.backend.security.model
com.jangular.backend.service - package com.jangular.backend.service
com.jangular.backend.utils - package com.jangular.backend.utils
commence(HttpServletRequest, HttpServletResponse, AuthenticationException) - Method in class com.jangular.backend.security.jwt.JwtAuthenticationEntryPoint
corsConfigurationSource() - Method in class com.jangular.backend.config.WebSecurityConfig
create(User) - Static method in class com.jangular.backend.security.UserPrincipal
createUser(User) - Method in class com.jangular.backend.service.UserService
  Creates a new user with encoded password and default USER role
CustomUserDetailsService - Class in com.jangular.backend.security
CustomUserDetailsService() - Constructor for class com.jangular.backend.security.CustomUserDetailsService

## D

DatabaseInitializer - Class in com.jangular.backend.config
DatabaseInitializer() - Constructor for class com.jangular.backend.config.DatabaseInitializer
deleteByToken(String) - Method in interface com.jangular.backend.repository.RefreshTokenRepository
deleteByUser(User) - Method in interface com.jangular.backend.repository.RefreshTokenRepository
deleteUser(Long) - Method in class com.jangular.backend.controller.UserController
  Soft delete a user (admin only)
doFilterInternal(HttpServletRequest, HttpServletResponse, FilterChain) - Method in class com.jangular.backend.security.jwt.JwtAuthenticationFilter

## E

existsByEmail(String) - Method in class com.jangular.backend.service.UserService
  Check if email already exists
existsByEmailAndIsDeletedFalse(String) - Method in interface com.jangular.backend.repository.UserRepository
existsByUsername(String) - Method in class com.jangular.backend.service.UserService
  Check if username already exists
existsByUsernameAndIsDeletedFalse(String) - Method in interface com.jangular.backend.repository.UserRepository
extractClaim(String, Function<Claims, T>) - Method in class com.jangular.backend.security.jwt.JwtTokenUtil
extractExpiration(String) - Method in class com.jangular.backend.security.jwt.JwtTokenUtil
extractUsername(String) - Method in class com.jangular.backend.security.jwt.JwtTokenUtil

## F

findActiveSessionsByUserId(Long) - Method in interface com.jangular.backend.repository.UserLoginHistoryRepository
findAllActiveUsers() - Method in class com.jangular.backend.service.UserService
  Get all active users
findByEmail(String) - Method in class com.jangular.backend.service.UserService
  Find user by email
findByEmailAndIsDeletedFalse(String) - Method in interface com.jangular.backend.repository.UserRepository
findById(Long) - Method in class com.jangular.backend.service.UserService
  Find user by ID
findByIdAndIsDeletedFalse(Long) - Method in interface com.jangular.backend.repository.UserRepository
findByIsActiveAndIsDeletedFalse(boolean) - Method in interface com.jangular.backend.repository.UserRepository
findByName(RoleName) - Method in interface com.jangular.backend.repository.RoleRepository
findByToken(String) - Method in interface com.jangular.backend.repository.RefreshTokenRepository
findByUser(User) - Method in interface com.jangular.backend.repository.RefreshTokenRepository
findByUserIdAndLoginTimeBetween(Long, LocalDateTime, LocalDateTime) - Method in interface com.jangular.backend.repository.UserLoginHistoryRepository
findByUserIdAndSuccessfulOrderByLoginTimeDesc(Long, boolean) - Method in interface com.jangular.backend.repository.UserLoginHistoryRepository
findByUserIdOrderByLoginTimeDesc(Long) - Method in interface com.jangular.backend.repository.UserLoginHistoryRepository
findByUsername(String) - Method in interface com.jangular.backend.repository.UserRepository
findByUsername(String) - Method in class com.jangular.backend.security.CustomUserDetailsService
findByUsername(String) - Method in class com.jangular.backend.service.UserService
  Find user by username
findByUsernameAndIsDeletedFalse(String) - Method in interface com.jangular.backend.repository.UserRepository
findByUsernameAndIsDeletedFalseAndIsActive(String, boolean) - Method in interface com.jangular.backend.repository.UserRepository
findTop5ByUserOrderByChangedAtDesc(User) - Method in interface com.jangular.backend.repository.PasswordHistoryRepository
findTopByUserIdAndSuccessfulTrueAndLogoutTimeIsNullOrderByLoginTimeDesc(Long) - Method in interface com.jangular.backend.repository.UserLoginHistoryRepository
flyway() - Method in class com.jangular.backend.config.FlywayConfig
FlywayConfig - Class in com.jangular.backend.config
FlywayConfig() - Constructor for class com.jangular.backend.config.FlywayConfig

## G

generateAccessToken(String) - Method in class com.jangular.backend.service.TokenService
  Generate access token with user information and roles
generateRefreshToken(String) - Method in class com.jangular.backend.service.TokenService
  Generate refresh token
generateRefreshToken(Authentication) - Method in class com.jangular.backend.security.jwt.JwtTokenProvider
generateRefreshToken(UserDetails) - Method in class com.jangular.backend.security.jwt.JwtTokenUtil
generateToken(Authentication) - Method in class com.jangular.backend.security.jwt.JwtTokenProvider
generateToken(UserDetails, Map<String, Object>) - Method in class com.jangular.backend.security.jwt.JwtTokenUtil
getActiveSessions(Long) - Method in class com.jangular.backend.controller.UserController
  Get active sessions
getActiveSessions(Long) - Method in class com.jangular.backend.service.UserLoginHistoryService
  Get active sessions (logins without logout)
getAllUsers() - Method in class com.jangular.backend.controller.UserController
  Get all users (admin only)
getAuthorities() - Method in class com.jangular.backend.security.UserPrincipal
getCurrentUser(Long) - Method in class com.jangular.backend.controller.UserController
  Get current user information
getDefaultRole() - Method in class com.jangular.backend.service.UserService
  Get default role (ROLE_USER)
getEmail() - Method in class com.jangular.backend.security.UserPrincipal
getExpirationDateFromToken(String) - Method in class com.jangular.backend.service.TokenService
  Get token expiration date
getFailedLogins(Long) - Method in class com.jangular.backend.service.UserLoginHistoryService
  Get failed login attempts
getId() - Method in class com.jangular.backend.security.UserPrincipal
getJwt() - Method in class com.jangular.backend.security.model.AuthenticationResponse
getLoginHistoryBetween(Long, LocalDateTime, LocalDateTime) - Method in class com.jangular.backend.service.UserLoginHistoryService
  Get login history within a date range
getPassword() - Method in class com.jangular.backend.security.model.AuthenticationRequest
getPassword() - Method in class com.jangular.backend.security.UserPrincipal
getRefreshToken() - Method in class com.jangular.backend.security.model.AuthenticationResponse
getRefreshToken() - Method in class com.jangular.backend.security.model.RefreshTokenRequest
getRoleNames() - Method in class com.jangular.backend.models.User
getRolesFromToken(String) - Method in class com.jangular.backend.service.TokenService
  Extract roles from token
getSuccessfulLogins(Long) - Method in class com.jangular.backend.service.UserLoginHistoryService
  Get successful login history
getUserById(Long) - Method in class com.jangular.backend.controller.UserController
  Get user by ID (admin only)
getUserIdFromToken(String) - Method in class com.jangular.backend.service.TokenService
  Extract user ID from token
getUserInformation() - Method in class com.jangular.backend.models.User
getUserLoginHistory(Long) - Method in class com.jangular.backend.controller.UserController
  Get user login history
getUserLoginHistory(Long) - Method in class com.jangular.backend.service.UserLoginHistoryService
  Get user login history
getUserLoginHistoryRange(Long, String, String) - Method in class com.jangular.backend.controller.UserController
  Get user login history for a specific date range
getUsername() - Method in class com.jangular.backend.security.model.AuthenticationRequest
getUsername() - Method in class com.jangular.backend.security.UserPrincipal
getUsernameFromToken(String) - Method in class com.jangular.backend.security.jwt.JwtTokenProvider
getUsernameFromToken(String) - Method in class com.jangular.backend.service.TokenService
  Extract username from token

## H

handle(HttpServletRequest, HttpServletResponse, AccessDeniedException) - Method in class com.jangular.backend.security.jwt.JwtAccessDeniedHandler

## I

incrementFailedAttempts(String) - Method in class com.jangular.backend.service.UserService
  Increment failed attempts
initRoles() - Method in class com.jangular.backend.config.DatabaseInitializer
  Initialize default roles when the application starts
isAccountNonExpired() - Method in class com.jangular.backend.security.UserPrincipal
isAccountNonLocked() - Method in class com.jangular.backend.security.UserPrincipal
isCredentialsNonExpired() - Method in class com.jangular.backend.security.UserPrincipal
isCurrentUser(Long) - Method in class com.jangular.backend.utils.SecurityUtils
  Check if the authenticated user is the user being accessed
isEnabled() - Method in class com.jangular.backend.security.UserPrincipal
isTokenExpired(String) - Method in class com.jangular.backend.service.TokenService
  Check if token is expired

## J

JwtAccessDeniedHandler - Class in com.jangular.backend.security.jwt
JwtAccessDeniedHandler() - Constructor for class com.jangular.backend.security.jwt.JwtAccessDeniedHandler
JwtAuthenticationEntryPoint - Class in com.jangular.backend.security.jwt
JwtAuthenticationEntryPoint() - Constructor for class com.jangular.backend.security.jwt.JwtAuthenticationEntryPoint
jwtAuthenticationFilter() - Method in class com.jangular.backend.config.WebSecurityConfig
JwtAuthenticationFilter - Class in com.jangular.backend.security.jwt
JwtAuthenticationFilter() - Constructor for class com.jangular.backend.security.jwt.JwtAuthenticationFilter
JwtTokenProvider - Class in com.jangular.backend.security.jwt
JwtTokenProvider() - Constructor for class com.jangular.backend.security.jwt.JwtTokenProvider
JwtTokenUtil - Class in com.jangular.backend.security.jwt
JwtTokenUtil() - Constructor for class com.jangular.backend.security.jwt.JwtTokenUtil

## L

loadUserById(Long) - Method in class com.jangular.backend.security.CustomUserDetailsService
loadUserByUsername(String) - Method in class com.jangular.backend.security.CustomUserDetailsService
lockUser(String) - Method in class com.jangular.backend.service.UserService
  Lock user account after max failed attempts
login(AuthRequest, HttpServletRequest) - Method in class com.jangular.backend.controller.AuthController
  User login endpoint
logout(HttpServletRequest) - Method in class com.jangular.backend.controller.AuthController
  Logout endpoint
logout(String) - Method in class com.jangular.backend.service.AuthenticationService
  Logout user (in a complete implementation, you might want to blacklist the token)

## M

main(String[]) - Static method in class com.jangular.backend.BackendApplication

## P

passwordEncoder() - Method in class com.jangular.backend.utils.SecurityUtils
PasswordHistory - Class in com.jangular.backend.models
PasswordHistory() - Constructor for class com.jangular.backend.models.PasswordHistory
PasswordHistoryRepository - Interface in com.jangular.backend.repository
prePersist() - Method in class com.jangular.backend.models.User

## R

recordLoginAttempt(Long, String, String, boolean, String) - Method in class com.jangular.backend.service.UserLoginHistoryService
  Record a login attempt (successful or failed)
recordLogout(Long) - Method in class com.jangular.backend.service.UserLoginHistoryService
  Record a user logout
refreshToken(TokenRefreshRequest) - Method in class com.jangular.backend.controller.AuthController
  Refresh token endpoint
refreshToken(String) - Method in class com.jangular.backend.service.AuthenticationService
  Refresh access token using refresh token
RefreshToken - Class in com.jangular.backend.models
RefreshToken() - Constructor for class com.jangular.backend.models.RefreshToken
RefreshTokenRepository - Interface in com.jangular.backend.repository
RefreshTokenRequest - Class in com.jangular.backend.security.model
RefreshTokenRequest() - Constructor for class com.jangular.backend.security.model.RefreshTokenRequest
RefreshTokenRequest(String) - Constructor for class com.jangular.backend.security.model.RefreshTokenRequest
register(RegisterRequest) - Method in class com.jangular.backend.controller.AuthController
  User registration endpoint
RegisterRequest - Class in com.jangular.backend.dto
RegisterRequest() - Constructor for class com.jangular.backend.dto.RegisterRequest
removeRoleFromUser(Long, RoleName) - Method in class com.jangular.backend.service.UserService
  Remove role from user
removeRoleFromUser(Long, String) - Method in class com.jangular.backend.controller.UserController
  Remove role from user (admin only)
resetFailedAttempts(String) - Method in class com.jangular.backend.service.UserService
  Reset failed attempts
ResourceNotFoundException - Exception Class in com.jangular.backend.exception
ResourceNotFoundException(String) - Constructor for exception class com.jangular.backend.exception.ResourceNotFoundException
Role - Class in com.jangular.backend.models
Role(RoleName, String) - Constructor for class com.jangular.backend.models.Role
ROLE_ADMIN - Enum constant in enum class com.jangular.backend.enums.RoleName
ROLE_MODERATOR - Enum constant in enum class com.jangular.backend.enums.RoleName
ROLE_USER - Enum constant in enum class com.jangular.backend.enums.RoleName
RoleName - Enum Class in com.jangular.backend.enums
RoleRepository - Interface in com.jangular.backend.repository
runSchemaScripts(DataSource) - Method in class com.jangular.backend.config.DatabaseInitializer
  Runs schema and data SQL scripts if needed Note: Use this method if you prefer SQL scripts over JPA/Hibernate schema generation

## S

securityFilterChain(HttpSecurity) - Method in class com.jangular.backend.config.WebSecurityConfig
SecurityUtils - Class in com.jangular.backend.utils
SecurityUtils() - Constructor for class com.jangular.backend.utils.SecurityUtils
setPassword(String) - Method in class com.jangular.backend.security.model.AuthenticationRequest
setRefreshToken(String) - Method in class com.jangular.backend.security.model.RefreshTokenRequest
setUsername(String) - Method in class com.jangular.backend.security.model.AuthenticationRequest
softDeleteUser(Long) - Method in class com.jangular.backend.service.UserService
  Soft delete a user

## T

TokenException - Exception Class in com.jangular.backend.exception
TokenException(String) - Constructor for exception class com.jangular.backend.exception.TokenException
TokenRefreshRequest - Class in com.jangular.backend.dto
TokenRefreshRequest() - Constructor for class com.jangular.backend.dto.TokenRefreshRequest
TokenService - Class in com.jangular.backend.service
TokenService() - Constructor for class com.jangular.backend.service.TokenService
toString() - Method in enum class com.jangular.backend.enums.RoleName

## U

unlockUser(String) - Method in class com.jangular.backend.service.UserService
  Unlock user account
updateUser(User) - Method in class com.jangular.backend.service.UserService
  Updates a user's information
updateUser(Long, UserDTO) - Method in class com.jangular.backend.controller.UserController
  Update user information
User - Class in com.jangular.backend.models
User() - Constructor for class com.jangular.backend.models.User
UserController - Class in com.jangular.backend.controller
UserController() - Constructor for class com.jangular.backend.controller.UserController
UserDTO - Class in com.jangular.backend.dto
UserDTO(User) - Constructor for class com.jangular.backend.dto.UserDTO
UserLoginHistory - Class in com.jangular.backend.models
UserLoginHistory() - Constructor for class com.jangular.backend.models.UserLoginHistory
UserLoginHistoryRepository - Interface in com.jangular.backend.repository
UserLoginHistoryService - Class in com.jangular.backend.service
UserLoginHistoryService() - Constructor for class com.jangular.backend.service.UserLoginHistoryService
UserPrincipal - Class in com.jangular.backend.security
UserPrincipal(Long, String, String, String, Collection<? extends GrantedAuthority>, boolean, boolean) - Constructor for class com.jangular.backend.security.UserPrincipal
UserRepository - Interface in com.jangular.backend.repository
UserService - Class in com.jangular.backend.service
UserService() - Constructor for class com.jangular.backend.service.UserService

## V

validateToken(String) - Method in class com.jangular.backend.security.jwt.JwtTokenProvider
validateToken(String, UserDetails) - Method in class com.jangular.backend.security.jwt.JwtTokenUtil
validateToken(String, UserDetails) - Method in class com.jangular.backend.service.TokenService
  Validate token
valueOf(String) - Static method in enum class com.jangular.backend.enums.RoleName
  Returns the enum constant of this class with the specified name.
values() - Static method in enum class com.jangular.backend.enums.RoleName
  Returns an array containing the constants of this enum class, in the order they are declared.

## W

WebSecurityConfig - Class in com.jangular.backend.config
WebSecurityConfig() - Constructor for class com.jangular.backend.config.WebSecurityConfig

A B C D E F G H I J L M P R S T U V W
All Classes and Interfaces|All Packages|Serialized Form