Index
All Classes and Interfaces|All Packages|Serialized Form
A
- AdminConfig - Class in tech.lastbox.lastshield.basicauth.configuration
-
Configuration class for setting up an admin user.
- AdminConfig(UserRepository, PasswordEncoder, BasicAuthProperties) - Constructor for class tech.lastbox.lastshield.basicauth.configuration.AdminConfig
- AuthController - Class in tech.lastbox.lastshield.basicauth.controller
-
Controller responsible for authentication and user management, including login and registration.
- AuthController(UserService, JwtService, BasicAuthProperties) - Constructor for class tech.lastbox.lastshield.basicauth.controller.AuthController
- AuthResponseDTO - Record Class in tech.lastbox.lastshield.basicauth.dto
-
Data Transfer Object (DTO) representing the response after authentication.
- AuthResponseDTO(Long, String, String, LocalDateTime) - Constructor for record class tech.lastbox.lastshield.basicauth.dto.AuthResponseDTO
-
Creates an instance of a
AuthResponseDTOrecord class.
B
- BasicAuthProperties - Class in tech.lastbox.lastshield.basicauth.enviroment
-
This class holds the configuration properties for Basic Authentication.
- BasicAuthProperties() - Constructor for class tech.lastbox.lastshield.basicauth.enviroment.BasicAuthProperties
C
- createUser(String, String, String) - Method in class tech.lastbox.lastshield.basicauth.service.UserService
-
Creates a new user.
D
- DuplicatedUserException - Exception Class in tech.lastbox.lastshield.basicauth.exception
-
Exception thrown when attempting to create a user with a username that already exists.
- DuplicatedUserException() - Constructor for exception class tech.lastbox.lastshield.basicauth.exception.DuplicatedUserException
-
Constructor for DuplicatedUserException.
E
- equals(Object) - Method in record class tech.lastbox.lastshield.basicauth.dto.AuthResponseDTO
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class tech.lastbox.lastshield.basicauth.dto.ErrorResponse
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class tech.lastbox.lastshield.basicauth.dto.LoginRequest
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class tech.lastbox.lastshield.basicauth.dto.RegisterRequest
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class tech.lastbox.lastshield.basicauth.dto.UserDTO
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in class tech.lastbox.lastshield.basicauth.entity.User
- ErrorResponse - Record Class in tech.lastbox.lastshield.basicauth.dto
-
Data Transfer Object (DTO) representing an error response.
- ErrorResponse(String, String, LocalDateTime) - Constructor for record class tech.lastbox.lastshield.basicauth.dto.ErrorResponse
-
Creates an instance of a
ErrorResponserecord class. - existsUserByUsername(String) - Method in interface tech.lastbox.lastshield.basicauth.repository.UserRepository
-
Checks if a user exists with the given username.
F
- findAllUsersAsDTO() - Method in interface tech.lastbox.lastshield.basicauth.repository.UserRepository
-
Retrieves a list of all users with the role 'USER', returning only the necessary fields in a UserDTO.
- findUserById(Long) - Method in interface tech.lastbox.lastshield.basicauth.repository.UserRepository
-
Find a user by their unique ID.
- findUserByRole(String) - Method in interface tech.lastbox.lastshield.basicauth.repository.UserRepository
-
Find a user by their role.
- findUserByUsername(String) - Method in interface tech.lastbox.lastshield.basicauth.repository.UserRepository
-
Find a user by their unique username.
- findUserByUsername(String) - Method in class tech.lastbox.lastshield.basicauth.service.UserService
-
Find a user by their username.
- findUsersByRole(String) - Method in interface tech.lastbox.lastshield.basicauth.repository.UserRepository
-
Find all users with the specified role.
G
- getAdminName() - Method in class tech.lastbox.lastshield.basicauth.enviroment.BasicAuthProperties
-
Gets the administrator's name.
- getAdminPassword() - Method in class tech.lastbox.lastshield.basicauth.enviroment.BasicAuthProperties
-
Gets the administrator's password.
- getAdminUsername() - Method in class tech.lastbox.lastshield.basicauth.enviroment.BasicAuthProperties
-
Gets the administrator's username.
- getId() - Method in class tech.lastbox.lastshield.basicauth.entity.User
- getIssuer() - Method in class tech.lastbox.lastshield.basicauth.enviroment.BasicAuthProperties
-
Gets the issuer for the token.
- getName() - Method in class tech.lastbox.lastshield.basicauth.entity.User
- getPassword() - Method in class tech.lastbox.lastshield.basicauth.entity.User
- getRole() - Method in class tech.lastbox.lastshield.basicauth.entity.User
- getSecretKey() - Method in class tech.lastbox.lastshield.basicauth.enviroment.BasicAuthProperties
-
Gets the secret key for token signing and verification.
- getUsername() - Method in class tech.lastbox.lastshield.basicauth.entity.User
- getUsersAsDTO() - Method in class tech.lastbox.lastshield.basicauth.service.UserService
-
Retrieves all users as UserDTO objects.
H
- hashCode() - Method in record class tech.lastbox.lastshield.basicauth.dto.AuthResponseDTO
-
Returns a hash code value for this object.
- hashCode() - Method in record class tech.lastbox.lastshield.basicauth.dto.ErrorResponse
-
Returns a hash code value for this object.
- hashCode() - Method in record class tech.lastbox.lastshield.basicauth.dto.LoginRequest
-
Returns a hash code value for this object.
- hashCode() - Method in record class tech.lastbox.lastshield.basicauth.dto.RegisterRequest
-
Returns a hash code value for this object.
- hashCode() - Method in record class tech.lastbox.lastshield.basicauth.dto.UserDTO
-
Returns a hash code value for this object.
- hashCode() - Method in class tech.lastbox.lastshield.basicauth.entity.User
I
- id() - Method in record class tech.lastbox.lastshield.basicauth.dto.AuthResponseDTO
-
Returns the value of the
idrecord component. - id() - Method in record class tech.lastbox.lastshield.basicauth.dto.UserDTO
-
Returns the value of the
idrecord component. - initializeSecurity(SecurityConfig) - Method in class tech.lastbox.lastshield.basicauth.configuration.SecurityConfigInitializer
-
Configures security settings for the application.
J
- jwtService() - Method in class tech.lastbox.lastshield.basicauth.configuration.SecurityConfigInitializer
-
Creates a JwtService bean for generating JWT tokens.
L
- login(String, String) - Method in class tech.lastbox.lastshield.basicauth.service.UserService
-
Attempts to log in with the provided username and password.
- login(LoginRequest) - Method in class tech.lastbox.lastshield.basicauth.controller.AuthController
-
Endpoint for user login.
- LoginRequest - Record Class in tech.lastbox.lastshield.basicauth.dto
-
Data Transfer Object (DTO) representing a login request.
- LoginRequest(String, String) - Constructor for record class tech.lastbox.lastshield.basicauth.dto.LoginRequest
-
Creates an instance of a
LoginRequestrecord class.
M
- message() - Method in record class tech.lastbox.lastshield.basicauth.dto.AuthResponseDTO
-
Returns the value of the
messagerecord component. - message() - Method in record class tech.lastbox.lastshield.basicauth.dto.ErrorResponse
-
Returns the value of the
messagerecord component.
N
- name() - Method in record class tech.lastbox.lastshield.basicauth.dto.RegisterRequest
-
Returns the value of the
namerecord component. - name() - Method in record class tech.lastbox.lastshield.basicauth.dto.UserDTO
-
Returns the value of the
namerecord component.
P
- password() - Method in record class tech.lastbox.lastshield.basicauth.dto.LoginRequest
-
Returns the value of the
passwordrecord component. - password() - Method in record class tech.lastbox.lastshield.basicauth.dto.RegisterRequest
-
Returns the value of the
passwordrecord component. - passwordEncoder() - Method in class tech.lastbox.lastshield.basicauth.configuration.SecurityConfigInitializer
-
Creates a PasswordEncoder bean using BCryptPasswordEncoder.
R
- register(RegisterRequest) - Method in class tech.lastbox.lastshield.basicauth.controller.AuthController
-
Endpoint for user registration.
- RegisterRequest - Record Class in tech.lastbox.lastshield.basicauth.dto
-
Data Transfer Object (DTO) representing a register request.
- RegisterRequest(String, String, String) - Constructor for record class tech.lastbox.lastshield.basicauth.dto.RegisterRequest
-
Creates an instance of a
RegisterRequestrecord class. - role() - Method in record class tech.lastbox.lastshield.basicauth.dto.UserDTO
-
Returns the value of the
rolerecord component.
S
- SecurityConfigInitializer - Class in tech.lastbox.lastshield.basicauth.configuration
-
Configuration class that initializes security settings such as JWT, CORS, and route protection.
- SecurityConfigInitializer(BasicAuthProperties, TokenRepository) - Constructor for class tech.lastbox.lastshield.basicauth.configuration.SecurityConfigInitializer
- setAdminName(String) - Method in class tech.lastbox.lastshield.basicauth.enviroment.BasicAuthProperties
-
Sets the administrator's name.
- setAdminPassword(String) - Method in class tech.lastbox.lastshield.basicauth.enviroment.BasicAuthProperties
-
Sets the administrator's password.
- setAdminUsername(String) - Method in class tech.lastbox.lastshield.basicauth.enviroment.BasicAuthProperties
-
Sets the administrator's username.
- setIssuer(String) - Method in class tech.lastbox.lastshield.basicauth.enviroment.BasicAuthProperties
-
Sets the issuer for the token.
- setName(String) - Method in class tech.lastbox.lastshield.basicauth.entity.User
- setPassword(String) - Method in class tech.lastbox.lastshield.basicauth.entity.User
- setRole(String) - Method in class tech.lastbox.lastshield.basicauth.entity.User
- setSecretKey(String) - Method in class tech.lastbox.lastshield.basicauth.enviroment.BasicAuthProperties
-
Sets the secret key for token signing and verification.
- setupAdminUser() - Method in class tech.lastbox.lastshield.basicauth.configuration.AdminConfig
-
CommandLineRunner bean that runs when the application starts.
- setUsername(String) - Method in class tech.lastbox.lastshield.basicauth.entity.User
- status() - Method in record class tech.lastbox.lastshield.basicauth.dto.ErrorResponse
-
Returns the value of the
statusrecord component.
T
- tech.lastbox.lastshield.basicauth.configuration - package tech.lastbox.lastshield.basicauth.configuration
- tech.lastbox.lastshield.basicauth.controller - package tech.lastbox.lastshield.basicauth.controller
- tech.lastbox.lastshield.basicauth.dto - package tech.lastbox.lastshield.basicauth.dto
- tech.lastbox.lastshield.basicauth.entity - package tech.lastbox.lastshield.basicauth.entity
- tech.lastbox.lastshield.basicauth.enviroment - package tech.lastbox.lastshield.basicauth.enviroment
- tech.lastbox.lastshield.basicauth.exception - package tech.lastbox.lastshield.basicauth.exception
- tech.lastbox.lastshield.basicauth.mapper - package tech.lastbox.lastshield.basicauth.mapper
- tech.lastbox.lastshield.basicauth.repository - package tech.lastbox.lastshield.basicauth.repository
- tech.lastbox.lastshield.basicauth.service - package tech.lastbox.lastshield.basicauth.service
- timestamp() - Method in record class tech.lastbox.lastshield.basicauth.dto.AuthResponseDTO
-
Returns the value of the
timestamprecord component. - timestamp() - Method in record class tech.lastbox.lastshield.basicauth.dto.ErrorResponse
-
Returns the value of the
timestamprecord component. - toDto(User) - Method in class tech.lastbox.lastshield.basicauth.mapper.UserMapper
-
Maps a User entity to a UserDTO.
- toEntity(UserDTO) - Method in class tech.lastbox.lastshield.basicauth.mapper.UserMapper
-
Maps a UserDTO to a User entity.
- token() - Method in record class tech.lastbox.lastshield.basicauth.dto.AuthResponseDTO
-
Returns the value of the
tokenrecord component. - TokenRepository - Interface in tech.lastbox.lastshield.basicauth.repository
-
Repository interface for handling token-related operations.
- toString() - Method in record class tech.lastbox.lastshield.basicauth.dto.AuthResponseDTO
-
Returns a string representation of this record class.
- toString() - Method in record class tech.lastbox.lastshield.basicauth.dto.ErrorResponse
-
Returns a string representation of this record class.
- toString() - Method in record class tech.lastbox.lastshield.basicauth.dto.LoginRequest
-
Returns a string representation of this record class.
- toString() - Method in record class tech.lastbox.lastshield.basicauth.dto.RegisterRequest
-
Returns a string representation of this record class.
- toString() - Method in record class tech.lastbox.lastshield.basicauth.dto.UserDTO
-
Returns a string representation of this record class.
U
- UnregisteredUserException - Exception Class in tech.lastbox.lastshield.basicauth.exception
-
Exception thrown when attempting to update a user that is not registered in the system.
- UnregisteredUserException(String) - Constructor for exception class tech.lastbox.lastshield.basicauth.exception.UnregisteredUserException
-
Constructor for UnregisteredUserException with a custom message.
- updateUser(User) - Method in class tech.lastbox.lastshield.basicauth.service.UserService
-
Updates the user details.
- User - Class in tech.lastbox.lastshield.basicauth.entity
-
Represents a User entity in the system.
- User() - Constructor for class tech.lastbox.lastshield.basicauth.entity.User
-
Default constructor for the User class.
- User(String, String, String) - Constructor for class tech.lastbox.lastshield.basicauth.entity.User
-
Constructor for creating a new User with the specified name, username, and password.
- UserDTO - Record Class in tech.lastbox.lastshield.basicauth.dto
-
Data Transfer Object (DTO) representing a user.
- UserDTO(Long, String, String, String) - Constructor for record class tech.lastbox.lastshield.basicauth.dto.UserDTO
-
Creates an instance of a
UserDTOrecord class. - UserMapper - Class in tech.lastbox.lastshield.basicauth.mapper
-
Mapper class that provides the transformation between User entity and UserDTO.
- UserMapper(UserRepository) - Constructor for class tech.lastbox.lastshield.basicauth.mapper.UserMapper
-
Constructor that injects the UserRepository.
- username() - Method in record class tech.lastbox.lastshield.basicauth.dto.LoginRequest
-
Returns the value of the
usernamerecord component. - username() - Method in record class tech.lastbox.lastshield.basicauth.dto.RegisterRequest
-
Returns the value of the
usernamerecord component. - username() - Method in record class tech.lastbox.lastshield.basicauth.dto.UserDTO
-
Returns the value of the
usernamerecord component. - UsernameNotFoundException - Exception Class in tech.lastbox.lastshield.basicauth.exception
-
Exception thrown when a username is not found in the database.
- UsernameNotFoundException() - Constructor for exception class tech.lastbox.lastshield.basicauth.exception.UsernameNotFoundException
-
Constructor for UsernameNotFoundException with a default message.
- UserRepository - Interface in tech.lastbox.lastshield.basicauth.repository
-
Repository interface for handling User-related database operations.
- UserService - Class in tech.lastbox.lastshield.basicauth.service
-
Service class for managing user-related operations, such as creating new users, logging in, and updating user details.
- UserService(UserRepository, PasswordEncoder) - Constructor for class tech.lastbox.lastshield.basicauth.service.UserService
All Classes and Interfaces|All Packages|Serialized Form