Package org.openiam.srvc.user
Class LoginDataWebServiceImpl
- java.lang.Object
-
- org.openiam.srvc.AbstractApiService
-
- org.openiam.srvc.user.LoginDataWebServiceImpl
-
- All Implemented Interfaces:
LoginDataWebService
@Service("loginWS") @Transactional public class LoginDataWebServiceImpl extends AbstractApiService implements LoginDataWebService
-
-
Field Summary
-
Fields inherited from class org.openiam.srvc.AbstractApiService
applicationContext, rabbitMQSender
-
-
Constructor Summary
Constructors Constructor Description LoginDataWebServiceImpl(LoginQueue queue)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ResponsebulkResetPasswordChangeCount()Resets number of times password has been changed to 0 for all users.Integercount(LoginSearchBean searchBean)Counts number of logins that match given search criteria.StringResponsedecryptPassword(String userId, String password)Decrypts password for user with given user Id.ResponseencryptPassword(String userId, String password)Encrypts the password string.List<Login>findBeans(LoginSearchBean searchBean, int from, int size)Retrieves Login beans that match given search criteria.LoginListResponsefindBeansResponse(LoginSearchBean searchBean, int from, int size)LoginfindById(String loginId)Retrieves login for given login Id.ResponseforgotUsername(String email)Sends password to user with registered email.LoginListResponsegetInactiveUsers(int startDays, int endDays)Return the list of users that have not logged in certain number of days.LoginListResponsegetLockedUserSince(Date lastExecTime)Retrieves users that has been locked since given date.LoginResponsegetLoginByManagedSys(String principal, String sysId)Deprecated.LoginListResponsegetLoginByUser(String userId)Deprecated.LoginResponsegetPrimaryIdentity(String userId)Retrieves primary identity for given user Id.LoginListResponsegetUserNearPswdExpiration(int expDays)Retrieves list of users whose password will soon expire.LoginListResponsegetUsersNearPswdExpiration()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.ResponseisPasswordEq(String principal, String managedSysId, String newPassword)Determines if the new password is equal to the current password that is associated with this principal.ResponseisValidLogin(Login principal)Checks if login is valid.ResponseloginExists(String principal, String managedSysId)Checks to see if a login exists for a user - domain - managed system combinationLoginResponserefreshIdentity(String loginId)Refresh user identityResponsereindex(String id)Reindexes a userResponseresetPasswordAndNotifyUser(String userId, String managedSysId, String contentProviderId, String password, boolean notifyUserViaEmail, boolean doActivateUser, boolean resetPasswordAlongWithRelatedAccounts)ResponseunLockLogin(String userId, String managedSysId)Unlocks user with given user Id.ResponseupdateAuthType(String userId, String principal, String authType)-
Methods inherited from class org.openiam.srvc.AbstractApiService
broadcast, crudRequest, getBooleanValue, getIntValue, getIntValue, getRabbitMqQueue, getResponse, getResponse, getValue, getValue, getValueList, getValueList, idRequest, manageApiRequest, manageApiRequest, manageCrudApiRequest, manageCrudApiRequest, manageCrudApiRequest, manageCrudApiRequest, membershipRequestProcessing, membershipRequestProcessing, publish, publish, sendAsync, sendAsync
-
-
-
-
Constructor Detail
-
LoginDataWebServiceImpl
@Autowired public LoginDataWebServiceImpl(LoginQueue queue)
-
-
Method Detail
-
isValidLogin
public Response isValidLogin(Login principal)
Description copied from interface:LoginDataWebServiceChecks if login is valid.- Specified by:
isValidLoginin interfaceLoginDataWebService- Parameters:
principal- Login to check.- Returns:
- Response.
-
decryptPassword
public StringResponse decryptPassword(String userId, String password)
Description copied from interface:LoginDataWebServiceDecrypts password for user with given user Id.- Specified by:
decryptPasswordin interfaceLoginDataWebService- Parameters:
userId- User Id.password- Password for decryption.- Returns:
- Response.
-
encryptPassword
public Response encryptPassword(String userId, String password)
Description copied from interface:LoginDataWebServiceEncrypts the password string.- Specified by:
encryptPasswordin interfaceLoginDataWebService- Parameters:
userId- User Id.password- Password.- Returns:
- Response.
-
getLoginByManagedSys
@Deprecated public LoginResponse getLoginByManagedSys(String principal, String sysId)
Deprecated.Description copied from interface:LoginDataWebServiceRetrieves LoginResponse for given principal and managedSysId.- Specified by:
getLoginByManagedSysin interfaceLoginDataWebService- Parameters:
principal- Principal.sysId- Managed system Id.- Returns:
- LoginResponse.
-
getLoginByUser
@Deprecated public LoginListResponse getLoginByUser(String userId)
Deprecated.Description copied from interface:LoginDataWebServiceRetrieves LoginListResponse for given user Id.- Specified by:
getLoginByUserin interfaceLoginDataWebService- Parameters:
userId- User Id.- Returns:
- LoginListResponse
-
resetPasswordAndNotifyUser
public Response resetPasswordAndNotifyUser(String userId, String managedSysId, String contentProviderId, String password, boolean notifyUserViaEmail, boolean doActivateUser, boolean resetPasswordAlongWithRelatedAccounts)
- Specified by:
resetPasswordAndNotifyUserin interfaceLoginDataWebService- Parameters:
userId- User Id.managedSysId- Managed system Id.contentProviderId- Password.password- Content provider Id.notifyUserViaEmail- If true user will be notified via email otherwise no.- Returns:
-
unLockLogin
public Response unLockLogin(String userId, String managedSysId)
Description copied from interface:LoginDataWebServiceUnlocks user with given user Id.- Specified by:
unLockLoginin interfaceLoginDataWebService- Parameters:
userId- User Id.managedSysId- Managed System Id.- Returns:
- Response.
-
isPasswordEq
public Response isPasswordEq(String principal, String managedSysId, String newPassword)
Description copied from interface:LoginDataWebServiceDetermines if the new password is equal to the current password that is associated with this principal.- Specified by:
isPasswordEqin interfaceLoginDataWebService- Parameters:
principal- Principal.managedSysId- Managed system Id.newPassword- New password.- Returns:
- Response.
-
loginExists
public Response loginExists(String principal, String managedSysId)
Checks to see if a login exists for a user - domain - managed system combination- Specified by:
loginExistsin interfaceLoginDataWebService- Parameters:
principal-managedSysId-- Returns:
-
getPrimaryIdentity
public LoginResponse getPrimaryIdentity(String userId)
Description copied from interface:LoginDataWebServiceRetrieves primary identity for given user Id.- Specified by:
getPrimaryIdentityin interfaceLoginDataWebService- Parameters:
userId- User Id.- Returns:
- LoginResponse.
-
findById
public Login findById(String loginId)
Description copied from interface:LoginDataWebServiceRetrieves login for given login Id.- Specified by:
findByIdin interfaceLoginDataWebService- Parameters:
loginId- Login Id.- Returns:
- Login.
-
findBeans
public List<Login> findBeans(LoginSearchBean searchBean, int from, int size)
Description copied from interface:LoginDataWebServiceRetrieves Login beans that match given search criteria.- Specified by:
findBeansin interfaceLoginDataWebService- Parameters:
searchBean- Search bean used for search criteria.from- Index of first bean to retrieve.size- Number of beans to retrieve.- Returns:
- List of Login beans.
-
findBeansResponse
public LoginListResponse findBeansResponse(LoginSearchBean searchBean, int from, int size)
- Specified by:
findBeansResponsein interfaceLoginDataWebService
-
count
public Integer count(LoginSearchBean searchBean)
Description copied from interface:LoginDataWebServiceCounts number of logins that match given search criteria.- Specified by:
countin interfaceLoginDataWebService- Parameters:
searchBean- Search bean used for search criteria.- Returns:
- Number of beans that match search criteria.
-
bulkResetPasswordChangeCount
public Response bulkResetPasswordChangeCount()
Description copied from interface:LoginDataWebServiceResets number of times password has been changed to 0 for all users.- Specified by:
bulkResetPasswordChangeCountin interfaceLoginDataWebService- Returns:
- Response.
-
getLockedUserSince
public LoginListResponse getLockedUserSince(Date lastExecTime)
Description copied from interface:LoginDataWebServiceRetrieves users that has been locked since given date.- Specified by:
getLockedUserSincein interfaceLoginDataWebService- Parameters:
lastExecTime- Date since users has been locked.- Returns:
- List of locked user logins.
-
getInactiveUsers
public LoginListResponse getInactiveUsers(int startDays, int endDays)
Description copied from interface:LoginDataWebServiceReturn the list of users that have not logged in certain number of days.- Specified by:
getInactiveUsersin interfaceLoginDataWebService- Parameters:
startDays- Start days.endDays- End days.- Returns:
- LoginListResponse.
-
getUserNearPswdExpiration
public LoginListResponse getUserNearPswdExpiration(int expDays)
Description copied from interface:LoginDataWebServiceRetrieves list of users whose password will soon expire.- Specified by:
getUserNearPswdExpirationin interfaceLoginDataWebService- Returns:
-
getUsersNearPswdExpiration
public LoginListResponse 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.- Specified by:
getUsersNearPswdExpirationin interfaceLoginDataWebService- Returns:
-
forgotUsername
public Response forgotUsername(String email)
Description copied from interface:LoginDataWebServiceSends password to user with registered email.- Specified by:
forgotUsernamein interfaceLoginDataWebService- Parameters:
email- Registered user email.- Returns:
- Response.
-
reindex
public Response reindex(String id)
Description copied from interface:LoginDataWebServiceReindexes a user- Specified by:
reindexin interfaceLoginDataWebService
-
refreshIdentity
public LoginResponse refreshIdentity(String loginId)
Refresh user identity- Specified by:
refreshIdentityin interfaceLoginDataWebService- Parameters:
loginId-- Returns:
-
updateAuthType
public Response updateAuthType(String userId, String principal, String authType)
- Specified by:
updateAuthTypein interfaceLoginDataWebService
-
-