Package org.openiam.esb.core.service
Interface LoginDataService
-
- All Known Implementing Classes:
LoginDataServiceImpl
public interface LoginDataService
Interface to manage the principal object. The principal object is largely used for service that use password based authentication.- Author:
- Suneet Shah
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
bulkResetPasswordChangeCount()
Integer
count(LoginSearchBean searchBean)
String
decryptPassword(String userId, String password)
String
encryptPassword(String userId, String password)
Encrypts the password string.List<Login>
findBeans(LoginSearchBean searchBean, int from, int size)
org.springframework.data.domain.Page<LoginAttribute>
findBeansAttributes(LoginAttributeSearchBean searchBean, int from, int size)
void
forgotUsername(String email)
LoginEntity
getByUserIdManagedSys(String userId, String managedSysId)
Returns the identity for this user and managedSysIdList<Login>
getInactiveUsers(int startDays, int endDays)
List<Login>
getLockedUserSince(Date lastExecTime)
List<LoginAttribute>
getLoginAttributes(String loginId)
Map<String,LoginAttributeList>
getLoginAttributesByUserId(String userId)
LoginEntity
getLoginByManagedSys(String principal, String sysId)
List<LoginEntity>
getLoginByUser(String userId)
Login
getLoginDTO(String loginId)
Login
getLoginDtoByManagedSys(String principal, String sysId)
String
getPassword(String principal, String sysId)
Returns a decrypted password.LoginEntity
getPasswordResetToken(String token)
LoginEntity
getPrimaryIdentity(String userId)
Returns the primary identity for this userLogin
getPrimaryIdentityDto(String userId)
List<Login>
getUserNearPswdExpiration(int expDays)
List<Login>
getUsersNearPswdExpiration()
Returns a list of Login objects which are nearing expiry depending on PWD_EXP_WARN password attribute If attribute unset, default is assumed to be 5.Response
isPasswordEq(String principal, String sysId, String newPassword)
determines if the new passowrd is equal to the current password that is associated with this principalboolean
loginExists(String principal, String sysId)
Checks to see if a login exists for a user - domain - managed system combinationLogin
refreshIdentity(String loginId)
Method used to refresh user identityvoid
reindex(String id)
Force reindex of a login record.Login
resetPasswordAndNotifyUser(String userId, String managedSysId, String contentProviderId, String password, boolean notifyUserViaEmail, String userAgent, String ipAddress, boolean resetPasswordAlongWithRelatedAccounts)
Login
resetPasswordAndNotifyUser(String userId, String managedSysId, String contentProviderId, String password, boolean notifyUserViaEmail, String userAgent, String ipAddress, ResetPasswordTypeEnum lastResetPasswdType, boolean resetPasswordAlongWithRelatedAccounts)
void
saveLoginAttribute(List<LoginAttribute> loginAttributeList, String loginId)
void
saveUserProvisionStatus(List<Login> loginList)
Method used to save login provision statusLogin
setPassword(String userId, String sysId, String password, boolean preventChangeCountIncrement, String contentProviderId)
Sets the password for a principal.void
unLockLogin(String userId, String sysId)
void
updateAuthType(String userId, String principal, String authLevelGroupingType)
List<LoginEntity>
usersWithPasswordExpYesterday()
List of users whose passworss are expiring todayvoid
validateLogin(Login object)
-
-
-
Method Detail
-
getLoginByManagedSys
LoginEntity getLoginByManagedSys(String principal, String sysId)
-
getPrimaryIdentity
LoginEntity getPrimaryIdentity(String userId)
Returns the primary identity for this user- Parameters:
userId
-- Returns:
-
getByUserIdManagedSys
LoginEntity getByUserIdManagedSys(String userId, String managedSysId)
Returns the identity for this user and managedSysId- Parameters:
userId
-managedSysId
-- Returns:
-
getPassword
String getPassword(String principal, String sysId) throws Exception
Returns a decrypted password.- Parameters:
principal
-sysId
-- Returns:
- Throws:
Exception
-
isPasswordEq
Response isPasswordEq(String principal, String sysId, String newPassword) throws BasicDataServiceException
determines if the new passowrd is equal to the current password that is associated with this principal- Parameters:
principal
-sysId
-newPassword
-- Returns:
- Throws:
BasicDataServiceException
-
loginExists
boolean loginExists(String principal, String sysId)
Checks to see if a login exists for a user - domain - managed system combination- Parameters:
principal
-sysId
-- Returns:
-
setPassword
Login setPassword(String userId, String sysId, String password, boolean preventChangeCountIncrement, String contentProviderId)
Sets the password for a principal. The password needs to be encrypted externally. this allow for flexiblity in supporting alternate approaches to encryption.- Parameters:
principal
-sysId
-password
-- Returns:
-
encryptPassword
String encryptPassword(String userId, String password) throws BasicDataServiceException
Encrypts the password string.- Parameters:
password
-- Returns:
- Throws:
BasicDataServiceException
-
decryptPassword
String decryptPassword(String userId, String password) throws BasicDataServiceException
- Throws:
BasicDataServiceException
-
getLoginByUser
List<LoginEntity> getLoginByUser(String userId)
-
bulkResetPasswordChangeCount
int bulkResetPasswordChangeCount()
-
getUsersNearPswdExpiration
List<Login> getUsersNearPswdExpiration()
Returns a list of Login objects which are nearing expiry depending on PWD_EXP_WARN password attribute If attribute unset, default is assumed to be 5.- Returns:
-
usersWithPasswordExpYesterday
List<LoginEntity> usersWithPasswordExpYesterday()
List of users whose passworss are expiring today- Returns:
-
getPasswordResetToken
LoginEntity getPasswordResetToken(String token)
-
count
Integer count(LoginSearchBean searchBean)
-
findBeans
List<Login> findBeans(LoginSearchBean searchBean, int from, int size)
-
forgotUsername
void forgotUsername(String email) throws BasicDataServiceException
- Throws:
BasicDataServiceException
-
validateLogin
void validateLogin(Login object) throws BasicDataServiceException
- Throws:
BasicDataServiceException
-
resetPasswordAndNotifyUser
Login resetPasswordAndNotifyUser(String userId, String managedSysId, String contentProviderId, String password, boolean notifyUserViaEmail, String userAgent, String ipAddress, boolean resetPasswordAlongWithRelatedAccounts) throws BasicDataServiceException
- Throws:
BasicDataServiceException
-
resetPasswordAndNotifyUser
Login resetPasswordAndNotifyUser(String userId, String managedSysId, String contentProviderId, String password, boolean notifyUserViaEmail, String userAgent, String ipAddress, ResetPasswordTypeEnum lastResetPasswdType, boolean resetPasswordAlongWithRelatedAccounts) throws BasicDataServiceException
- Throws:
BasicDataServiceException
-
reindex
void reindex(String id)
Force reindex of a login record. Should NOT be called by production code. Exists for test purposes only- Parameters:
id
-
-
saveUserProvisionStatus
void saveUserProvisionStatus(List<Login> loginList)
Method used to save login provision status- Parameters:
loginList
-
-
saveLoginAttribute
void saveLoginAttribute(List<LoginAttribute> loginAttributeList, String loginId)
-
getLoginAttributes
List<LoginAttribute> getLoginAttributes(String loginId)
-
findBeansAttributes
org.springframework.data.domain.Page<LoginAttribute> findBeansAttributes(LoginAttributeSearchBean searchBean, int from, int size)
-
getLoginAttributesByUserId
Map<String,LoginAttributeList> getLoginAttributesByUserId(String userId)
-
refreshIdentity
Login refreshIdentity(String loginId)
Method used to refresh user identity- Parameters:
loginId
-- Returns:
- Login in case of successful refresh and null in opposite one
-
-