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 Response
bulkResetPasswordChangeCount()
Resets number of times password has been changed to 0 for all users.Integer
count(LoginSearchBean searchBean)
Counts number of logins that match given search criteria.StringResponse
decryptPassword(String userId, String password)
Decrypts password for user with given user Id.Response
encryptPassword(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.LoginListResponse
findBeansResponse(LoginSearchBean searchBean, int from, int size)
Login
findById(String loginId)
Retrieves login for given login Id.Response
forgotUsername(String email)
Sends password to user with registered email.LoginListResponse
getInactiveUsers(int startDays, int endDays)
Return the list of users that have not logged in certain number of days.LoginListResponse
getLockedUserSince(Date lastExecTime)
Retrieves users that has been locked since given date.LoginResponse
getLoginByManagedSys(String principal, String sysId)
Deprecated.LoginListResponse
getLoginByUser(String userId)
Deprecated.LoginResponse
getPrimaryIdentity(String userId)
Retrieves primary identity for given user Id.LoginListResponse
getUserNearPswdExpiration(int expDays)
Retrieves list of users whose password will soon expire.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.Response
isPasswordEq(String principal, String managedSysId, String newPassword)
Determines if the new password is equal to the current password that is associated with this principal.Response
isValidLogin(Login principal)
Checks if login is valid.Response
loginExists(String principal, String managedSysId)
Checks to see if a login exists for a user - domain - managed system combinationLoginResponse
refreshIdentity(String loginId)
Refresh user identityResponse
reindex(String id)
Reindexes a userResponse
resetPasswordAndNotifyUser(String userId, String managedSysId, String contentProviderId, String password, boolean notifyUserViaEmail, boolean doActivateUser, boolean resetPasswordAlongWithRelatedAccounts)
Response
unLockLogin(String userId, String managedSysId)
Unlocks user with given user Id.Response
updateAuthType(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:LoginDataWebService
Checks if login is valid.- Specified by:
isValidLogin
in interfaceLoginDataWebService
- Parameters:
principal
- Login to check.- Returns:
- Response.
-
decryptPassword
public StringResponse decryptPassword(String userId, String password)
Description copied from interface:LoginDataWebService
Decrypts password for user with given user Id.- Specified by:
decryptPassword
in interfaceLoginDataWebService
- Parameters:
userId
- User Id.password
- Password for decryption.- Returns:
- Response.
-
encryptPassword
public Response encryptPassword(String userId, String password)
Description copied from interface:LoginDataWebService
Encrypts the password string.- Specified by:
encryptPassword
in interfaceLoginDataWebService
- Parameters:
userId
- User Id.password
- Password.- Returns:
- Response.
-
getLoginByManagedSys
@Deprecated public LoginResponse getLoginByManagedSys(String principal, String sysId)
Deprecated.Description copied from interface:LoginDataWebService
Retrieves LoginResponse for given principal and managedSysId.- Specified by:
getLoginByManagedSys
in interfaceLoginDataWebService
- Parameters:
principal
- Principal.sysId
- Managed system Id.- Returns:
- LoginResponse.
-
getLoginByUser
@Deprecated public LoginListResponse getLoginByUser(String userId)
Deprecated.Description copied from interface:LoginDataWebService
Retrieves LoginListResponse for given user Id.- Specified by:
getLoginByUser
in 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:
resetPasswordAndNotifyUser
in 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:LoginDataWebService
Unlocks user with given user Id.- Specified by:
unLockLogin
in 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:LoginDataWebService
Determines if the new password is equal to the current password that is associated with this principal.- Specified by:
isPasswordEq
in 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:
loginExists
in interfaceLoginDataWebService
- Parameters:
principal
-managedSysId
-- Returns:
-
getPrimaryIdentity
public LoginResponse getPrimaryIdentity(String userId)
Description copied from interface:LoginDataWebService
Retrieves primary identity for given user Id.- Specified by:
getPrimaryIdentity
in interfaceLoginDataWebService
- Parameters:
userId
- User Id.- Returns:
- LoginResponse.
-
findById
public Login findById(String loginId)
Description copied from interface:LoginDataWebService
Retrieves login for given login Id.- Specified by:
findById
in interfaceLoginDataWebService
- Parameters:
loginId
- Login Id.- Returns:
- Login.
-
findBeans
public List<Login> findBeans(LoginSearchBean searchBean, int from, int size)
Description copied from interface:LoginDataWebService
Retrieves Login beans that match given search criteria.- Specified by:
findBeans
in 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:
findBeansResponse
in interfaceLoginDataWebService
-
count
public Integer count(LoginSearchBean searchBean)
Description copied from interface:LoginDataWebService
Counts number of logins that match given search criteria.- Specified by:
count
in 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:LoginDataWebService
Resets number of times password has been changed to 0 for all users.- Specified by:
bulkResetPasswordChangeCount
in interfaceLoginDataWebService
- Returns:
- Response.
-
getLockedUserSince
public LoginListResponse getLockedUserSince(Date lastExecTime)
Description copied from interface:LoginDataWebService
Retrieves users that has been locked since given date.- Specified by:
getLockedUserSince
in 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:LoginDataWebService
Return the list of users that have not logged in certain number of days.- Specified by:
getInactiveUsers
in interfaceLoginDataWebService
- Parameters:
startDays
- Start days.endDays
- End days.- Returns:
- LoginListResponse.
-
getUserNearPswdExpiration
public LoginListResponse getUserNearPswdExpiration(int expDays)
Description copied from interface:LoginDataWebService
Retrieves list of users whose password will soon expire.- Specified by:
getUserNearPswdExpiration
in 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:
getUsersNearPswdExpiration
in interfaceLoginDataWebService
- Returns:
-
forgotUsername
public Response forgotUsername(String email)
Description copied from interface:LoginDataWebService
Sends password to user with registered email.- Specified by:
forgotUsername
in interfaceLoginDataWebService
- Parameters:
email
- Registered user email.- Returns:
- Response.
-
reindex
public Response reindex(String id)
Description copied from interface:LoginDataWebService
Reindexes a user- Specified by:
reindex
in interfaceLoginDataWebService
-
refreshIdentity
public LoginResponse refreshIdentity(String loginId)
Refresh user identity- Specified by:
refreshIdentity
in interfaceLoginDataWebService
- Parameters:
loginId
-- Returns:
-
updateAuthType
public Response updateAuthType(String userId, String principal, String authType)
- Specified by:
updateAuthType
in interfaceLoginDataWebService
-
-