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
- Context
public void startLoginFlow()
LiAuthService
startLoginFlow
in interface LiAuthService
public void startLoginFlow(java.lang.String ssoToken)
startLoginFlow
in interface LiAuthService
public void performAuthorizationRequest(LiSSOAuthorizationRequest request)
performAuthorizationRequest
in interface LiAuthService
request
- LiSSOAuthorizationRequest
public void performSSOAuthorizationRequest(LiSSOAuthorizationRequest request) throws LiRestResponseException
performSSOAuthorizationRequest
in interface LiAuthService
request
- LiSSOAuthorizationRequest
LiRestResponseException
- LiRestResponseException
public void handleAuthorizationResponse(LiSSOAuthResponse response, LiAuthRestClient authRestClient, LiAuthService.LoginCompleteCallBack loginCompleteCallBack) throws LiRestResponseException
handleAuthorizationResponse
in interface LiAuthService
response
- LiSSOAuthResponse
authRestClient
- LiAuthRestClient
loginCompleteCallBack
- LoginCompleteCallBack
LiRestResponseException
- LiRestResponseException
public void getUserAfterTokenResponse(LiAuthService.LoginCompleteCallBack loginCompleteCallBack)
getUserAfterTokenResponse
in interface LiAuthService
loginCompleteCallBack
- LoginCompleteCallBack
public void performRefreshTokenRequest(LiAuthService.LiTokenResponseCallback callback) throws LiRestResponseException
performRefreshTokenRequest
in interface LiAuthService
callback
- LiTokenResponseCallback
LiRestResponseException
- LiRestResponseException
public LiTokenResponse performSyncRefreshTokenRequest() throws LiRestResponseException
performSyncRefreshTokenRequest
in interface LiAuthService
LiTokenResponse
LiRestResponseException
- LiRestResponseException
public void enablePostAuthorizationFlows(boolean isLoginSuccess, int responseCode)
enablePostAuthorizationFlows
in interface LiAuthService
isLoginSuccess
- 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