Package org.openiam.srvc.am
Class AuthenticationWebServiceImpl
- java.lang.Object
-
- org.openiam.srvc.AbstractApiService
-
- org.openiam.srvc.am.AuthenticationWebServiceImpl
-
- All Implemented Interfaces:
AuthenticationService
@Service("authenticate") public class AuthenticationWebServiceImpl extends AbstractApiService implements AuthenticationService
Created by alexander on 11/08/16.
-
-
Field Summary
-
Fields inherited from class org.openiam.srvc.AbstractApiService
applicationContext, log, rabbitMQSender
-
-
Constructor Summary
Constructors Constructor Description AuthenticationWebServiceImpl(AuthenticationQueue queue)
-
Method Summary
-
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
-
AuthenticationWebServiceImpl
@Autowired public AuthenticationWebServiceImpl(AuthenticationQueue queue)
-
-
Method Detail
-
globalLogout
public void globalLogout(String userId) throws Throwable
Description copied from interface:AuthenticationService
Use- Specified by:
globalLogout
in interfaceAuthenticationService
- Throws:
Throwable
-
globalLogoutRequest
public Response globalLogoutRequest(LogoutRequest request)
Description copied from interface:AuthenticationService
This method executes a global logout so that the user is logged out all the application they have logged into.
For example:authenticationService.globalLogoutWithContentProvider(userId, contentProviderId);
- Specified by:
globalLogoutRequest
in interfaceAuthenticationService
- Parameters:
request
- The request to logout.
-
login
public AuthenticationResponse login(AuthenticationRequest request)
Description copied from interface:AuthenticationService
This method logs in a user. It updates his Login record to reflect this fact. Unsuccessful logins attempts are counted. If the user unsuccessfully logins in N number of times in a row, his account is locked. 'N' is defined in the Password Policy.- Specified by:
login
in interfaceAuthenticationService
- Parameters:
request
- - authentication request specific to the user logging in.- Returns:
- - an
AuthenticationResponse
object containing the user's token, principal, and internal user ID. If the login attempt was successful,AuthenticationResponse.getStatus()
returns ResponseCode.SUCCESS. Otherwise, it is set to ResponseCode.FAILURE
-
clearOTPActiveStatus
public Response clearOTPActiveStatus(OTPServiceRequest request)
- Specified by:
clearOTPActiveStatus
in interfaceAuthenticationService
-
isOTPActive
public boolean isOTPActive(OTPServiceRequest request)
- Specified by:
isOTPActive
in interfaceAuthenticationService
-
sendOTPToken
public Response sendOTPToken(OTPServiceRequest request)
- Specified by:
sendOTPToken
in interfaceAuthenticationService
-
confirmOTPToken
public Response confirmOTPToken(OTPServiceRequest request)
- Specified by:
confirmOTPToken
in interfaceAuthenticationService
-
renewToken
public Response renewToken(String principal, String token, String patternId)
Description copied from interface:AuthenticationService
Attempts to renew the SSO Token for this user.- Specified by:
renewToken
in interfaceAuthenticationService
- Parameters:
principal
- - the user's logintoken
- - the current token- Returns:
- a
Response
object. If successful,Response.getStatus()
returns ResponseCode.SUCCESS. Otherwise, it returns ResponseCode.FAILURE. If renewal is successful Response.getResponseValue() will contains anSSOToken
Object.
-
findBeans
public List<AuthStateEntity> findBeans(AuthStateSearchBean searchBean, int from, int size)
- Specified by:
findBeans
in interfaceAuthenticationService
-
save
public Response save(AuthStateEntity entity)
- Specified by:
save
in interfaceAuthenticationService
-
getAllLoginModuleSpringBeans
public List<String> getAllLoginModuleSpringBeans()
- Specified by:
getAllLoginModuleSpringBeans
in interfaceAuthenticationService
-
checkVerificationCode
public boolean checkVerificationCode(VerificationCodeRequest request)
Description copied from interface:AuthenticationService
Check sms code for approve phone number- Specified by:
checkVerificationCode
in interfaceAuthenticationService
- Returns:
-
sendVerificationCode
public Response sendVerificationCode(VerificationCodeRequest request)
Description copied from interface:AuthenticationService
Send sms code for check phone number- Specified by:
sendVerificationCode
in interfaceAuthenticationService
- Returns:
-
canOTPBeSuppressed
public BooleanResponse canOTPBeSuppressed(OTPSuppressionRequest request)
- Specified by:
canOTPBeSuppressed
in interfaceAuthenticationService
-
getAuthenticationDetails
public AuthenticationDetailsResponse getAuthenticationDetails(IdServiceRequest request)
- Specified by:
getAuthenticationDetails
in interfaceAuthenticationService
-
isITPolicyAccepted
public BooleanResponse isITPolicyAccepted(UserITPolicyHistoryRequest request)
- Specified by:
isITPolicyAccepted
in interfaceAuthenticationService
-
-