# Uses of Class
com.jangular.backend.models.UserLoginHistory

Packages that use UserLoginHistory
Package
Description
com.jangular.backend.controller
com.jangular.backend.repository
com.jangular.backend.service

## Uses of UserLoginHistory in com.jangular.backend.controller

Methods in com.jangular.backend.controller that return types with arguments of type UserLoginHistory
Modifier and Type
Method
Description
`org.springframework.http.ResponseEntity<List<UserLoginHistory>>`
UserController.`getActiveSessions(Long id)`
Get active sessions
`org.springframework.http.ResponseEntity<List<UserLoginHistory>>`
UserController.`getUserLoginHistory(Long id)`
Get user login history
`org.springframework.http.ResponseEntity<List<UserLoginHistory>>`
UserController.`getUserLoginHistoryRange(Long id, String startDate, String endDate)`
Get user login history for a specific date range

## Uses of UserLoginHistory in com.jangular.backend.repository

Methods in com.jangular.backend.repository that return types with arguments of type UserLoginHistory
Modifier and Type
Method
Description
`List<UserLoginHistory>`
UserLoginHistoryRepository.`findActiveSessionsByUserId(Long userId)`
`List<UserLoginHistory>`
UserLoginHistoryRepository.`findByUserIdAndLoginTimeBetween(Long userId, LocalDateTime startDate, LocalDateTime endDate)`
`List<UserLoginHistory>`
UserLoginHistoryRepository.`findByUserIdAndSuccessfulOrderByLoginTimeDesc(Long userId, boolean successful)`
`List<UserLoginHistory>`
UserLoginHistoryRepository.`findByUserIdOrderByLoginTimeDesc(Long userId)`
`Optional<UserLoginHistory>`
UserLoginHistoryRepository.`findTopByUserIdAndSuccessfulTrueAndLogoutTimeIsNullOrderByLoginTimeDesc(Long userId)`

## Uses of UserLoginHistory in com.jangular.backend.service

Methods in com.jangular.backend.service that return UserLoginHistory
Modifier and Type
Method
Description
`UserLoginHistory`
UserLoginHistoryService.`recordLoginAttempt(Long userId, String ipAddress, String userAgent, boolean successful, String errorMessage)`
Record a login attempt (successful or failed)
Methods in com.jangular.backend.service that return types with arguments of type UserLoginHistory
Modifier and Type
Method
Description
`List<UserLoginHistory>`
UserLoginHistoryService.`getActiveSessions(Long userId)`
Get active sessions (logins without logout)
`List<UserLoginHistory>`
UserLoginHistoryService.`getFailedLogins(Long userId)`
Get failed login attempts
`List<UserLoginHistory>`
UserLoginHistoryService.`getLoginHistoryBetween(Long userId, LocalDateTime startDate, LocalDateTime endDate)`
Get login history within a date range
`List<UserLoginHistory>`
UserLoginHistoryService.`getSuccessfulLogins(Long userId)`
Get successful login history
`List<UserLoginHistory>`
UserLoginHistoryService.`getUserLoginHistory(Long userId)`
Get user login history