public class LiAuthServiceImpl extends java.lang.Object implements LiAuthService
LiAuthService.FreshTokenCallBack, LiAuthService.LiTokenResponseCallback, LiAuthService.LoginCompleteCallBack| Modifier and Type | Field and Description |
|---|---|
protected android.content.Context |
mContext |
| Constructor and Description |
|---|
LiAuthServiceImpl(android.content.Context context)
Constructor for non SSO flow
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Killing the service.
|
void |
enablePostAuthorizationFlows(boolean isLoginSuccess,
int responseCode)
Process post Authorization.
|
void |
getUserAfterTokenResponse(LiAuthService.LoginCompleteCallBack loginCompleteCallBack)
Fetches user details after Tokens are received.
|
void |
handleAuthorizationResponse(LiSSOAuthResponse response,
LiAuthRestClient authRestClient,
LiAuthService.LoginCompleteCallBack loginCompleteCallBack)
Fetch Access Token from Auth Code received after Authorization Process.
|
void |
performAuthorizationRequest(LiSSOAuthorizationRequest request)
Performs Authorization (Non SSO flow).
|
void |
performRefreshTokenRequest(LiAuthService.LiTokenResponseCallback callback)
Fetching fresh access token from refresh token.
|
void |
performSSOAuthorizationRequest(LiSSOAuthorizationRequest request)
Performs Authorization (SSO flow).
|
LiTokenResponse |
performSyncRefreshTokenRequest()
Fetching fresh access token from refresh token.
|
void |
startLoginFlow()
Initiates Login Flow
|
void |
startLoginFlow(java.lang.String ssoToken)
starts login flow
|
public LiAuthServiceImpl(android.content.Context context)
context - Contextpublic void startLoginFlow()
LiAuthServicestartLoginFlow in interface LiAuthServicepublic void startLoginFlow(java.lang.String ssoToken)
startLoginFlow in interface LiAuthServicepublic void performAuthorizationRequest(LiSSOAuthorizationRequest request)
performAuthorizationRequest in interface LiAuthServicerequest - LiSSOAuthorizationRequestpublic void performSSOAuthorizationRequest(LiSSOAuthorizationRequest request) throws LiRestResponseException
performSSOAuthorizationRequest in interface LiAuthServicerequest - LiSSOAuthorizationRequestLiRestResponseException - LiRestResponseExceptionpublic void handleAuthorizationResponse(LiSSOAuthResponse response, LiAuthRestClient authRestClient, LiAuthService.LoginCompleteCallBack loginCompleteCallBack) throws LiRestResponseException
handleAuthorizationResponse in interface LiAuthServiceresponse - LiSSOAuthResponseauthRestClient - LiAuthRestClientloginCompleteCallBack - LoginCompleteCallBackLiRestResponseException - LiRestResponseExceptionpublic void getUserAfterTokenResponse(LiAuthService.LoginCompleteCallBack loginCompleteCallBack)
getUserAfterTokenResponse in interface LiAuthServiceloginCompleteCallBack - LoginCompleteCallBackpublic void performRefreshTokenRequest(LiAuthService.LiTokenResponseCallback callback) throws LiRestResponseException
performRefreshTokenRequest in interface LiAuthServicecallback - LiTokenResponseCallbackLiRestResponseException - LiRestResponseExceptionpublic LiTokenResponse performSyncRefreshTokenRequest() throws LiRestResponseException
performSyncRefreshTokenRequest in interface LiAuthServiceLiTokenResponseLiRestResponseException - LiRestResponseExceptionpublic void enablePostAuthorizationFlows(boolean isLoginSuccess,
int responseCode)
enablePostAuthorizationFlows in interface LiAuthServiceisLoginSuccess - Checks if login is complete i.e user details has been fetched.responseCode - HTTP error code that gets returned in the intentpublic void dispose()
dispose in interface LiAuthService