public interface IdentityService
Modifier and Type | Method and Description |
---|---|
JSONObject |
getBackendToken()
Method to get the Backend Token for the Current Identity Name.
|
String |
getIdentityType()
Method to get the Identity Type for current IdentityName.
|
void |
getSecurityAttributes(AttributesCallback callback)
Method to get the Session Attributes for the current IdentityName.
|
void |
getUserAttributes(AttributesCallback callback)
Method to get the User Attributes for the current IdentityName.
|
void |
getUserData(AttributesCallback callback)
Method to get the User Data for the current IdentityName.
|
JSONObject |
getUserProfile()
Method to get the User Profile for the current IdentityName.
|
void |
getUserProfile(boolean getFromServer,
AttributesCallback callback)
Method to get the User Profile for the current IdentityName.
|
boolean |
isLoggedIn()
Method to know the whether User is Logged in or not.
|
void |
loginInBackground(Context context,
WebView webview,
WebViewCallback webviewCallback)
Login with the given credentials asynchronously and executes the given
callback.
|
void |
loginInBackground(Hashtable<String,String> customtable,
LoginCallback loginCallback)
Login with the given credentials asynchronously and executes the given
callback.
|
void |
loginInBackground(String username,
String password,
LoginCallback loginCallback)
Login with the given credentials asynchronously and executes the given
callback.
|
void |
logoutInBackground(LogoutCallback logoutCallback)
Logout asynchronously and executes the given callback.
|
void loginInBackground(String username, String password, LoginCallback loginCallback)
username
- usernamepassword
- passwordloginCallback
- loginCallback interface have the following success/failure callback methods.
onSuccess(KonyUser user) and
onFailure(IdentityServiceException identityServiceException)void loginInBackground(Hashtable<String,String> customtable, LoginCallback loginCallback)
customtable
- loginCallback
- loginCallback interface have the following success/failure callback methods.
onSuccess(KonyUser user) and
onFailure(IdentityServiceException identityServiceException)void loginInBackground(Context context, WebView webview, WebViewCallback webviewCallback)
context
- - Context used for storing the data an application level.webview
- - for authenticate the OAuth user.webviewCallback
- webviewCallback interface have the following success/failure callback methods.
onSuccess(KonyUser user) and
onFailure(IdentityServiceException identityServiceException)void logoutInBackground(LogoutCallback logoutCallback)
logoutCallback
- logoutCallback interface have the following success/failure callback methods.
onSuccess(boolean result) and
onFailure(IdentityServiceException identityServiceException)boolean isLoggedIn()
JSONObject getBackendToken()
String getIdentityType()
JSONObject getUserProfile()
void getUserProfile(boolean getFromServer, AttributesCallback callback)
-
- getFromServer specifies to fetch the profile from servervoid getUserData(AttributesCallback callback)
void getUserAttributes(AttributesCallback callback)
void getSecurityAttributes(AttributesCallback callback)