Class BasicAuthenticator
- java.lang.Object
-
- org.openmetadata.service.security.auth.BasicAuthenticator
-
- All Implemented Interfaces:
AuthenticatorHandler
public class BasicAuthenticator extends Object implements AuthenticatorHandler
-
-
Constructor Summary
Constructors Constructor Description BasicAuthenticator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidchangeUserPwdWithOldPwd(javax.ws.rs.core.UriInfo uriInfo, String userName, ChangePasswordRequest request)voidcheckIfLoginBlocked(String userName)voidconfirmEmailRegistration(javax.ws.rs.core.UriInfo uriInfo, String emailToken)RefreshTokencreateRefreshTokenForLogin(UUID currentUserId)JwtResponsegetNewAccessToken(TokenRefreshRequest request)voidinit(OpenMetadataApplicationConfig config, org.jdbi.v3.core.Jdbi jdbi)JwtResponseloginUser(LoginRequest loginRequest)UserlookUserInProvider(String userName)voidrecordFailedLoginAttempt(String providedIdentity, User storedUser)UserregisterUser(RegistrationRequest newRegistrationRequest)voidresendRegistrationToken(javax.ws.rs.core.UriInfo uriInfo, User registeredUser)voidresetUserPasswordWithToken(javax.ws.rs.core.UriInfo uriInfo, PasswordResetRequest request)voidsendEmailVerification(javax.ws.rs.core.UriInfo uriInfo, User user)voidsendInviteMailToUser(javax.ws.rs.core.UriInfo uriInfo, User user, String subject, CreateUser.CreatePasswordType requestType, String pwd)voidsendPasswordResetLink(javax.ws.rs.core.UriInfo uriInfo, User user, String subject, String templateFilePath)RefreshTokenvalidateAndReturnNewRefresh(UUID currentUserId, TokenRefreshRequest tokenRefreshRequest)voidvalidateEmailAlreadyExists(String email)voidvalidatePassword(String providedIdentity, User storedUser, String reqPassword)voidverifyPasswordResetTokenExpiry(PasswordResetToken token)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.openmetadata.service.security.auth.AuthenticatorHandler
getJwtResponse
-
-
-
-
Method Detail
-
init
public void init(OpenMetadataApplicationConfig config, org.jdbi.v3.core.Jdbi jdbi)
- Specified by:
initin interfaceAuthenticatorHandler
-
registerUser
public User registerUser(RegistrationRequest newRegistrationRequest)
- Specified by:
registerUserin interfaceAuthenticatorHandler
-
confirmEmailRegistration
public void confirmEmailRegistration(javax.ws.rs.core.UriInfo uriInfo, String emailToken)- Specified by:
confirmEmailRegistrationin interfaceAuthenticatorHandler
-
resendRegistrationToken
public void resendRegistrationToken(javax.ws.rs.core.UriInfo uriInfo, User registeredUser) throws IOException- Specified by:
resendRegistrationTokenin interfaceAuthenticatorHandler- Throws:
IOException
-
sendEmailVerification
public void sendEmailVerification(javax.ws.rs.core.UriInfo uriInfo, User user) throws IOException- Specified by:
sendEmailVerificationin interfaceAuthenticatorHandler- Throws:
IOException
-
sendPasswordResetLink
public void sendPasswordResetLink(javax.ws.rs.core.UriInfo uriInfo, User user, String subject, String templateFilePath) throws IOException- Specified by:
sendPasswordResetLinkin interfaceAuthenticatorHandler- Throws:
IOException
-
resetUserPasswordWithToken
public void resetUserPasswordWithToken(javax.ws.rs.core.UriInfo uriInfo, PasswordResetRequest request) throws IOException- Specified by:
resetUserPasswordWithTokenin interfaceAuthenticatorHandler- Throws:
IOException
-
changeUserPwdWithOldPwd
public void changeUserPwdWithOldPwd(javax.ws.rs.core.UriInfo uriInfo, String userName, ChangePasswordRequest request) throws IOException- Specified by:
changeUserPwdWithOldPwdin interfaceAuthenticatorHandler- Throws:
IOException
-
sendInviteMailToUser
public void sendInviteMailToUser(javax.ws.rs.core.UriInfo uriInfo, User user, String subject, CreateUser.CreatePasswordType requestType, String pwd) throws IOException- Specified by:
sendInviteMailToUserin interfaceAuthenticatorHandler- Throws:
IOException
-
createRefreshTokenForLogin
public RefreshToken createRefreshTokenForLogin(UUID currentUserId)
- Specified by:
createRefreshTokenForLoginin interfaceAuthenticatorHandler
-
getNewAccessToken
public JwtResponse getNewAccessToken(TokenRefreshRequest request)
- Specified by:
getNewAccessTokenin interfaceAuthenticatorHandler
-
verifyPasswordResetTokenExpiry
public void verifyPasswordResetTokenExpiry(PasswordResetToken token)
-
validateAndReturnNewRefresh
public RefreshToken validateAndReturnNewRefresh(UUID currentUserId, TokenRefreshRequest tokenRefreshRequest)
-
validateEmailAlreadyExists
public void validateEmailAlreadyExists(String email)
-
loginUser
public JwtResponse loginUser(LoginRequest loginRequest) throws IOException, freemarker.template.TemplateException
- Specified by:
loginUserin interfaceAuthenticatorHandler- Throws:
IOExceptionfreemarker.template.TemplateException
-
checkIfLoginBlocked
public void checkIfLoginBlocked(String userName)
- Specified by:
checkIfLoginBlockedin interfaceAuthenticatorHandler
-
recordFailedLoginAttempt
public void recordFailedLoginAttempt(String providedIdentity, User storedUser) throws freemarker.template.TemplateException, IOException
- Specified by:
recordFailedLoginAttemptin interfaceAuthenticatorHandler- Throws:
freemarker.template.TemplateExceptionIOException
-
validatePassword
public void validatePassword(String providedIdentity, User storedUser, String reqPassword) throws freemarker.template.TemplateException, IOException
- Specified by:
validatePasswordin interfaceAuthenticatorHandler- Throws:
freemarker.template.TemplateExceptionIOException
-
lookUserInProvider
public User lookUserInProvider(String userName)
- Specified by:
lookUserInProviderin interfaceAuthenticatorHandler
-
-