Class AuthService
java.lang.Object
es.kukenan.smartfi.microservice.backoffice.service.AuthService
Authentication related services.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate AuditServiceBackoffice endpoints implementation.private InternalApiClientBack office clients manager.private es.kukenan.smartfi.common.service.jwt.JwtServiceJwtService.private KukenSaltConfigKuken salt configuration.private intPassword length.private StringKey used for generate RSA cipher.private es.kukenan.smartfi.common.context.RequestContextManagerRequest context manager.(package private) RolRepositoryRol repository.protected ServiceUtilitiesService Utilities for users services.private SmtpMailNotificationHandlerComponent for handle SMTP communication inside backoffice.(package private) UserRepositoryUser repository. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancheckCredentials(LoginRequest loginDto, User user) org.springframework.http.ResponseEntity<?>doLogin(LoginRequest loginRequest) login method for DB authentication.org.springframework.http.ResponseEntity<?>doResetPassword(ResetPasswordRequest resetPasswordRequest) Reset Password method for registered user.private StringgetLoginOperation(String type) Get Login AuditOperation from login type.
-
Field Details
-
passwordLength
@Value("${backoffice.password.length}") private int passwordLengthPassword length. -
publicKey
Key used for generate RSA cipher. -
userRepository
User repository. -
roleRepository
Rol repository. -
kukenSaltConfig
Kuken salt configuration. -
serviceUtilities
Service Utilities for users services. -
jwtService
@Autowired private es.kukenan.smartfi.common.service.jwt.JwtService jwtServiceJwtService. -
internalApiClient
Back office clients manager. -
auditService
Backoffice endpoints implementation. -
requestContextManager
@Autowired private es.kukenan.smartfi.common.context.RequestContextManager requestContextManagerRequest context manager. -
smtpMailNotificationHandler
Component for handle SMTP communication inside backoffice.
-
-
Constructor Details
-
AuthService
public AuthService()
-
-
Method Details
-
doLogin
login method for DB authentication.- Parameters:
loginRequest- login request data.- Returns:
- LoginResponse object with user data.
-
getLoginOperation
Get Login AuditOperation from login type.- Parameters:
type- backoffice login type.- Returns:
- Login AuditOperation.
-
checkCredentials
-
doResetPassword
public org.springframework.http.ResponseEntity<?> doResetPassword(ResetPasswordRequest resetPasswordRequest) Reset Password method for registered user.- Parameters:
resetPasswordRequest- login request data.- Returns:
- LoginResponse object with user data.
-