Class AuthService
java.lang.Object
org.bh_foundation.e_sign.services.auth.AuthService
-
Constructor Summary
ConstructorsConstructorDescriptionAuthService(UserRepository userRepository, PasswordResetTokenRepository passwordResetTokenRepository, org.springframework.security.authentication.AuthenticationManager authenticationManager, JwtService jwtService, jakarta.servlet.http.HttpServletRequest servletRequest, jakarta.servlet.http.HttpServletResponse servletResponse, org.springframework.security.crypto.password.PasswordEncoder passwordEncoder, MailService mailService, SessionService sessionService) -
Method Summary
Modifier and TypeMethodDescriptionauthenticate(User request) ResponseDto<?> ResponseDto<?> ResponseDto<?> resetForgottenPassword(String token, String newPassword) ResponseDto<?> sendForgotPasswordEmail(String email) booleanbooleanvalidateResetPasswordToken(String token) booleanverification(String token) ResponseDto<?> verifyWithOtp(String otp)
-
Constructor Details
-
AuthService
public AuthService(UserRepository userRepository, PasswordResetTokenRepository passwordResetTokenRepository, org.springframework.security.authentication.AuthenticationManager authenticationManager, JwtService jwtService, jakarta.servlet.http.HttpServletRequest servletRequest, jakarta.servlet.http.HttpServletResponse servletResponse, org.springframework.security.crypto.password.PasswordEncoder passwordEncoder, MailService mailService, SessionService sessionService)
-
-
Method Details
-
verification
-
verifyWithOtp
-
resendVerificationEmail
- Throws:
jakarta.mail.MessagingExceptionIOException
-
resendOtpEmail
- Throws:
jakarta.mail.MessagingExceptionIOException
-
register
public AuthenticationResponseDto register(User request) throws jakarta.mail.MessagingException, IOException - Throws:
jakarta.mail.MessagingExceptionIOException
-
authenticate
-
refreshToken
-
sendForgotPasswordEmail
public ResponseDto<?> sendForgotPasswordEmail(String email) throws jakarta.mail.MessagingException, IOException - Throws:
jakarta.mail.MessagingExceptionIOException
-
resetForgottenPassword
-
validateResetPasswordToken
-
validateExpirationToken
public boolean validateExpirationToken()
-