diff --git a/CHANGELOG.md b/CHANGELOG.md
index 734bb5b..0560269 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,28 @@
> **LoginRadius Java SDK Change Log** provides information regarding what has changed, more specifically what changes, improvements and bug fix has been made to the SDK. For more details please refer to the [LoginRadius API Documention(https://www.loginradius.com/docs/api/v2/deployment/sdk-libraries/java-library/)
+# Version 11.0.0
+Released on **Aug 21, 2020**
+
+## Enhancements
+
+ - Added a parameter isWeb in "RefreshAccessToken" API.
+ - Added a parameter SocialAppName in "getAccessTokenByFacebookAccessToken, getAccessTokenByTwitterAccessToken,
+ getAccessTokenByGoogleAccessToken, getAccessTokenByLinkedinAccessToken, getAccessTokenByAppleIdCode, getAccessTokenByGoogleAuthCode" native Social login APIs.
+
+
+## Added new multiple APIs for better user experience
+
+ - Added linkSocialIdentities(POST) API.
+ - Added linkSocialIdentitiesByPing(POST) API.
+ - Added getAccessTokenByAppleIdCode API.
+ - Added getAccessTokenByWeChatCode API.
+
+
+## Removed APIs:
+
+ - linkSocialIdentity API(PUT)
+ - getSocialIdentity API(GET)
+
### Version 10.0.2
Release on **April 27,2020**
diff --git a/LoginRadius-JavaSDK/pom.xml b/LoginRadius-JavaSDK/pom.xml
index cf3fd19..9bc73f4 100644
--- a/LoginRadius-JavaSDK/pom.xml
+++ b/LoginRadius-JavaSDK/pom.xml
@@ -6,7 +6,7 @@
com.loginradius.sdk
java-sdk
- 10.0.2
+ 11.0.0
LoginRadius java SDK contains registration and social APIs
https://github.com/LoginRadius/java-sdk
diff --git a/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/api/account/AccountApi.java b/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/api/account/AccountApi.java
index afb3008..6dbaf6e 100644
--- a/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/api/account/AccountApi.java
+++ b/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/api/account/AccountApi.java
@@ -874,9 +874,9 @@ public void onFailure(ErrorResponse errorResponse) {
}
//
- // This API is used to refresh an access_token via it's associated refresh_token.
+ // This API is used to refresh an access token via it's associated refresh token.
//
- // LoginRadius refresh_token
+ // LoginRadius refresh token
// Response containing Definition of Complete Token data
// 18.31
@@ -913,7 +913,7 @@ public void onFailure(ErrorResponse errorResponse) {
//
// The Revoke Refresh Access Token API is used to revoke a refresh token or the Provider Access Token, revoking an existing refresh token will invalidate the refresh token but the associated access token will work until the expiry.
//
- // LoginRadius refresh_token
+ // LoginRadius refresh token
// Response containing Definition of Delete Request
// 18.32
diff --git a/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/api/advanced/CustomRegistrationDataApi.java b/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/api/advanced/CustomRegistrationDataApi.java
index e34d4a3..9d1a36e 100644
--- a/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/api/advanced/CustomRegistrationDataApi.java
+++ b/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/api/advanced/CustomRegistrationDataApi.java
@@ -186,7 +186,7 @@ public void onFailure(ErrorResponse errorResponse) {
}
//
- // This API allows you to fill data into a dropdown list which you have created for user Registeration. For more details on how to use this API please see our Custom Registration Data Overview
+ // This API allows you to fill data into a dropdown list which you have created for user Registration. For more details on how to use this API please see our Custom Registration Data Overview
//
// Model Class containing Definition of List of Registration Data
// Response containing Definition of Complete Validation data
diff --git a/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/api/advanced/MultiFactorAuthenticationApi.java b/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/api/advanced/MultiFactorAuthenticationApi.java
index aca25cc..8d69e4b 100644
--- a/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/api/advanced/MultiFactorAuthenticationApi.java
+++ b/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/api/advanced/MultiFactorAuthenticationApi.java
@@ -42,7 +42,7 @@ public MultiFactorAuthenticationApi(){
//
- // This API is used to configure the Multi-factor authentication after login by using the access_token when MFA is set as optional on the LoginRadius site.
+ // This API is used to configure the Multi-factor authentication after login by using the access token when MFA is set as optional on the LoginRadius site.
//
// Uniquely generated identifier key by LoginRadius that is activated after successful authentication.
// SMS Template Name
@@ -232,7 +232,7 @@ public void onFailure(ErrorResponse errorResponse) {
}
//
- // This API Resets the Google Authenticator configurations on a given account via the access_token
+ // This API Resets the Google Authenticator configurations on a given account via the access token
//
// Uniquely generated identifier key by LoginRadius that is activated after successful authentication.
// boolean type value,Enable google Authenticator Code.
@@ -272,7 +272,7 @@ public void onFailure(ErrorResponse errorResponse) {
}
//
- // This API resets the SMS Authenticator configurations on a given account via the access_token.
+ // This API resets the SMS Authenticator configurations on a given account via the access token.
//
// Uniquely generated identifier key by LoginRadius that is activated after successful authentication.
// Pass 'otpauthenticator' to remove SMS Authenticator
@@ -312,7 +312,7 @@ public void onFailure(ErrorResponse errorResponse) {
}
//
- // This API is used to get a set of backup codes via access_token to allow the user login on a site that has Multi-factor Authentication enabled in the event that the user does not have a secondary factor available. We generate 10 codes, each code can only be consumed once. If any user attempts to go over the number of invalid login attempts configured in the Dashboard then the account gets blocked automatically
+ // This API is used to get a set of backup codes via access token to allow the user login on a site that has Multi-factor Authentication enabled in the event that the user does not have a secondary factor available. We generate 10 codes, each code can only be consumed once. If any user attempts to go over the number of invalid login attempts configured in the Dashboard then the account gets blocked automatically
//
// Uniquely generated identifier key by LoginRadius that is activated after successful authentication.
// Response containing Definition of Complete Backup Code data
@@ -348,7 +348,7 @@ public void onFailure(ErrorResponse errorResponse) {
}
//
- // API is used to reset the backup codes on a given account via the access_token. This API call will generate 10 new codes, each code can only be consumed once
+ // API is used to reset the backup codes on a given account via the access token. This API call will generate 10 new codes, each code can only be consumed once
//
// Uniquely generated identifier key by LoginRadius that is activated after successful authentication.
// Response containing Definition of Complete Backup Code data
@@ -719,7 +719,7 @@ public void onFailure(ErrorResponse errorResponse) {
}
//
- // This API is used to validate the backup code provided by the user and if valid, we return an access_token allowing the user to login incases where Multi-factor authentication (MFA) is enabled and the secondary factor is unavailable. When a user initially downloads the Backup codes, We generate 10 codes, each code can only be consumed once. if any user attempts to go over the number of invalid login attempts configured in the Dashboard then the account gets blocked automatically
+ // This API is used to validate the backup code provided by the user and if valid, we return an access token allowing the user to login incases where Multi-factor authentication (MFA) is enabled and the secondary factor is unavailable. When a user initially downloads the Backup codes, We generate 10 codes, each code can only be consumed once. if any user attempts to go over the number of invalid login attempts configured in the Dashboard then the account gets blocked automatically
//
// Model Class containing Definition of payload for MultiFactorAuth By BackupCode API
// A Uniquely generated MFA identifier token after successful authentication
diff --git a/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/api/advanced/ReAuthenticationApi.java b/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/api/advanced/ReAuthenticationApi.java
index 025e5f8..c72abe4 100644
--- a/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/api/advanced/ReAuthenticationApi.java
+++ b/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/api/advanced/ReAuthenticationApi.java
@@ -40,7 +40,7 @@ public ReAuthenticationApi(){
//
- // This API is used to trigger the Multi-Factor Autentication workflow for the provided access_token
+ // This API is used to trigger the Multi-Factor Autentication workflow for the provided access token
//
// Uniquely generated identifier key by LoginRadius that is activated after successful authentication.
// SMS Template Name
@@ -122,7 +122,7 @@ public void onFailure(ErrorResponse errorResponse) {
}
//
- // This API is used to re-authenticate by set of backup codes via access_token on the site that has Multi-factor authentication enabled in re-authentication for the user that does not have the device
+ // This API is used to re-authenticate by set of backup codes via access token on the site that has Multi-factor authentication enabled in re-authentication for the user that does not have the device
//
// Uniquely generated identifier key by LoginRadius that is activated after successful authentication.
// Model Class containing Definition for MFA Reauthentication by Backup code
diff --git a/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/api/authentication/AuthenticationApi.java b/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/api/authentication/AuthenticationApi.java
index 967ec9d..16ece93 100644
--- a/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/api/authentication/AuthenticationApi.java
+++ b/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/api/authentication/AuthenticationApi.java
@@ -40,7 +40,6 @@
import com.loginradius.sdk.models.responsemodels.otherobjects.TokenInfoResponseModel;
import com.loginradius.sdk.models.responsemodels.otherobjects.UserProfilePostResponse;
import com.loginradius.sdk.models.responsemodels.userprofile.Identity;
-import com.loginradius.sdk.models.responsemodels.userprofile.SocialUserProfile;
import com.loginradius.sdk.util.AsyncHandler;
import com.loginradius.sdk.util.ErrorResponse;
import com.loginradius.sdk.util.LoginRadiusSDK;
@@ -314,7 +313,7 @@ public void onFailure(ErrorResponse errorResponse) {
// This api call invalidates the active access token or expires an access token's validity.
//
// Uniquely generated identifier key by LoginRadius that is activated after successful authentication.
- // Boolean value that when set as true, in addition of the access_token being invalidated, it will no longer have the capability of being refreshed.
+ // Boolean value that when set as true, in addition of the access token being invalidated, it will no longer have the capability of being refreshed.
// Response containing Definition of Complete Validation data
// 4.2
@@ -388,7 +387,7 @@ public void onFailure(ErrorResponse errorResponse) {
}
//
- // This API retrieves a copy of the user data based on the access_token.
+ // This API retrieves a copy of the user data based on the access token.
//
// Uniquely generated identifier key by LoginRadius that is activated after successful authentication.
// The fields parameter filters the API response so that the response only includes a specific set of fields
@@ -470,7 +469,7 @@ public void onFailure(ErrorResponse errorResponse) {
}
//
- // This API is used to update the user's profile by passing the access_token.
+ // This API is used to update the user's profile by passing the access token.
//
// Uniquely generated identifier key by LoginRadius that is activated after successful authentication.
// Model Class containing Definition of payload for User Profile update API
@@ -615,7 +614,7 @@ public void onFailure(ErrorResponse errorResponse) {
}
//
- // This API is used to allow a customer with a valid access_token to unlock their account provided that they successfully pass the prompted Bot Protection challenges. The Block or Suspend block types are not applicable for this API. For additional details see our Auth Security Configuration documentation.You are only required to pass the Post Parameters that correspond to the prompted challenges.
+ // This API is used to allow a customer with a valid access token to unlock their account provided that they successfully pass the prompted Bot Protection challenges. The Block or Suspend block types are not applicable for this API. For additional details see our Auth Security Configuration documentation.You are only required to pass the Post Parameters that correspond to the prompted challenges.
//
// Uniquely generated identifier key by LoginRadius that is activated after successful authentication.
// Payload containing Unlock Profile API
@@ -1323,22 +1322,28 @@ public void onFailure(ErrorResponse errorResponse) {
}
//
- // This API is used to link up a social provider account with the specified account based on the access token and the social providers user access token.
+ // This API is used to unlink up a social provider account with the specified account based on the access token and the social providers user access token. The unlinked account will automatically get removed from your database.
//
// Access_Token
- // Access token of the account to be linked
- // Response containing Definition of Complete Validation data
- // 12.1
+ // Name of the provider
+ // Unique ID of the linked account
+ // Response containing Definition of Delete Request
+ // 12.2
- public void linkSocialIdentities(String accessToken, String candidateToken, final AsyncHandler handler) {
+ public void unlinkSocialIdentities(String accessToken, String provider,
+ String providerId, final AsyncHandler handler) {
if (LoginRadiusValidator.isNullOrWhiteSpace(accessToken)) {
throw new IllegalArgumentException(LoginRadiusValidator.getValidationMessage("accessToken"));
}
- if (LoginRadiusValidator.isNullOrWhiteSpace(candidateToken)) {
- throw new IllegalArgumentException(LoginRadiusValidator.getValidationMessage("candidateToken"));
+ if (LoginRadiusValidator.isNullOrWhiteSpace(provider)) {
+ throw new IllegalArgumentException(LoginRadiusValidator.getValidationMessage("provider"));
+ }
+
+ if (LoginRadiusValidator.isNullOrWhiteSpace(providerId)) {
+ throw new IllegalArgumentException(LoginRadiusValidator.getValidationMessage("providerId"));
}
Map queryParameters = new HashMap();
@@ -1346,16 +1351,17 @@ public void linkSocialIdentities(String accessToken, String candidateToken, fina
queryParameters.put("apiKey", LoginRadiusSDK.getApiKey());
JsonObject bodyParameters = new JsonObject();
- bodyParameters.addProperty("candidateToken", candidateToken);
+ bodyParameters.addProperty("provider", provider);
+ bodyParameters.addProperty("providerId", providerId);
String resourcePath = "identity/v2/auth/socialidentity";
- LoginRadiusRequest.execute("PUT", resourcePath, queryParameters, gson.toJson(bodyParameters), new AsyncHandler() {
+ LoginRadiusRequest.execute("DELETE", resourcePath, queryParameters, gson.toJson(bodyParameters), new AsyncHandler() {
@Override
public void onSuccess(String response) {
- TypeToken typeToken = new TypeToken() {};
- PostResponse successResponse = JsonDeserializer.deserializeJson(response,typeToken);
+ TypeToken typeToken = new TypeToken() {};
+ DeleteResponse successResponse = JsonDeserializer.deserializeJson(response,typeToken);
handler.onSuccess(successResponse);
}
@@ -1367,28 +1373,22 @@ public void onFailure(ErrorResponse errorResponse) {
}
//
- // This API is used to unlink up a social provider account with the specified account based on the access token and the social providers user access token. The unlinked account will automatically get removed from your database.
+ // This API is used to link up a social provider account with an existing LoginRadius account on the basis of access token and the social providers user access token.
//
- // Access_Token
- // Name of the provider
- // Unique ID of the linked account
- // Response containing Definition of Delete Request
- // 12.2
+ // Uniquely generated identifier key by LoginRadius that is activated after successful authentication.
+ // Access token of the account to be linked
+ // Response containing Definition of Complete Validation data
+ // 12.4
- public void unlinkSocialIdentities(String accessToken, String provider,
- String providerId, final AsyncHandler handler) {
+ public void linkSocialIdentities(String accessToken, String candidateToken, final AsyncHandler handler) {
if (LoginRadiusValidator.isNullOrWhiteSpace(accessToken)) {
throw new IllegalArgumentException(LoginRadiusValidator.getValidationMessage("accessToken"));
}
- if (LoginRadiusValidator.isNullOrWhiteSpace(provider)) {
- throw new IllegalArgumentException(LoginRadiusValidator.getValidationMessage("provider"));
- }
-
- if (LoginRadiusValidator.isNullOrWhiteSpace(providerId)) {
- throw new IllegalArgumentException(LoginRadiusValidator.getValidationMessage("providerId"));
+ if (LoginRadiusValidator.isNullOrWhiteSpace(candidateToken)) {
+ throw new IllegalArgumentException(LoginRadiusValidator.getValidationMessage("candidateToken"));
}
Map queryParameters = new HashMap();
@@ -1396,17 +1396,16 @@ public void unlinkSocialIdentities(String accessToken, String provider,
queryParameters.put("apiKey", LoginRadiusSDK.getApiKey());
JsonObject bodyParameters = new JsonObject();
- bodyParameters.addProperty("provider", provider);
- bodyParameters.addProperty("providerId", providerId);
+ bodyParameters.addProperty("candidateToken", candidateToken);
String resourcePath = "identity/v2/auth/socialidentity";
- LoginRadiusRequest.execute("DELETE", resourcePath, queryParameters, gson.toJson(bodyParameters), new AsyncHandler() {
+ LoginRadiusRequest.execute("POST", resourcePath, queryParameters, gson.toJson(bodyParameters), new AsyncHandler() {
@Override
public void onSuccess(String response) {
- TypeToken typeToken = new TypeToken() {};
- DeleteResponse successResponse = JsonDeserializer.deserializeJson(response,typeToken);
+ TypeToken typeToken = new TypeToken() {};
+ PostResponse successResponse = JsonDeserializer.deserializeJson(response,typeToken);
handler.onSuccess(successResponse);
}
@@ -1418,36 +1417,39 @@ public void onFailure(ErrorResponse errorResponse) {
}
//
- // This API is called just after account linking API and it prevents the raas profile of the second account from getting created.
+ // This API is used to link up a social provider account with an existing LoginRadius account on the basis of ping and the social providers user access token.
//
// Uniquely generated identifier key by LoginRadius that is activated after successful authentication.
- // The fields parameter filters the API response so that the response only includes a specific set of fields
- // Response containing Definition for Complete SocialUserProfile data
- // 12.3
+ // Unique ID generated by client
+ // Response containing Definition of Complete Validation data
+ // 12.5
- public void getSocialIdentity(String accessToken, String fields, final AsyncHandler handler) {
+ public void linkSocialIdentitiesByPing(String accessToken, String clientGuid, final AsyncHandler handler) {
if (LoginRadiusValidator.isNullOrWhiteSpace(accessToken)) {
throw new IllegalArgumentException(LoginRadiusValidator.getValidationMessage("accessToken"));
+ }
+
+ if (LoginRadiusValidator.isNullOrWhiteSpace(clientGuid)) {
+ throw new IllegalArgumentException(LoginRadiusValidator.getValidationMessage("clientGuid"));
}
Map queryParameters = new HashMap();
queryParameters.put("access_token", accessToken);
queryParameters.put("apiKey", LoginRadiusSDK.getApiKey());
- if (!LoginRadiusValidator.isNullOrWhiteSpace(fields)) {
- queryParameters.put("fields", fields);
- }
+ JsonObject bodyParameters = new JsonObject();
+ bodyParameters.addProperty("clientGuid", clientGuid);
String resourcePath = "identity/v2/auth/socialidentity";
- LoginRadiusRequest.execute("GET", resourcePath, queryParameters, null, new AsyncHandler() {
+ LoginRadiusRequest.execute("POST", resourcePath, queryParameters, gson.toJson(bodyParameters), new AsyncHandler() {
@Override
public void onSuccess(String response) {
- TypeToken typeToken = new TypeToken() {};
- SocialUserProfile successResponse = JsonDeserializer.deserializeJson(response,typeToken);
+ TypeToken typeToken = new TypeToken() {};
+ PostResponse successResponse = JsonDeserializer.deserializeJson(response,typeToken);
handler.onSuccess(successResponse);
}
@@ -1539,7 +1541,7 @@ public void onFailure(ErrorResponse errorResponse) {
}
//
- // This API is used to update the privacy policy stored in the user's profile by providing the access_token of the user accepting the privacy policy
+ // This API is used to update the privacy policy stored in the user's profile by providing the access token of the user accepting the privacy policy
//
// Uniquely generated identifier key by LoginRadius that is activated after successful authentication.
// The fields parameter filters the API response so that the response only includes a specific set of fields
@@ -1580,7 +1582,7 @@ public void onFailure(ErrorResponse errorResponse) {
}
//
- // This API will return all the accepted privacy policies for the user by providing the access_token of that user.
+ // This API will return all the accepted privacy policies for the user by providing the access token of that user.
//
// Uniquely generated identifier key by LoginRadius that is activated after successful authentication.
// Complete Policy History data
diff --git a/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/api/authentication/PINAuthenticationApi.java b/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/api/authentication/PINAuthenticationApi.java
index 02d7406..02431bb 100644
--- a/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/api/authentication/PINAuthenticationApi.java
+++ b/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/api/authentication/PINAuthenticationApi.java
@@ -49,7 +49,7 @@ public PINAuthenticationApi(){
//
- // This API is used to login a user by pin and session_token.
+ // This API is used to login a user by pin and session token.
//
// Model Class containing Definition of payload for LoginByPin API
// Session Token of user
diff --git a/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/api/authentication/PhoneAuthenticationApi.java b/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/api/authentication/PhoneAuthenticationApi.java
index 127bf6c..31339a5 100644
--- a/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/api/authentication/PhoneAuthenticationApi.java
+++ b/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/api/authentication/PhoneAuthenticationApi.java
@@ -453,7 +453,7 @@ public void onFailure(ErrorResponse errorResponse) {
}
//
- // This API is used to delete the Phone ID on a user's account via the access_token
+ // This API is used to delete the Phone ID on a user's account via the access token
//
// Uniquely generated identifier key by LoginRadius that is activated after successful authentication.
// Response containing Definition of Delete Request
diff --git a/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/api/social/NativeSocialApi.java b/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/api/social/NativeSocialApi.java
index 6a6f08d..1a2b3c4 100644
--- a/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/api/social/NativeSocialApi.java
+++ b/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/api/social/NativeSocialApi.java
@@ -35,11 +35,12 @@ public NativeSocialApi(){
// The API is used to get LoginRadius access token by sending Facebook's access token. It will be valid for the specific duration of time specified in the response.
//
// Facebook Access Token
+ // Name of Social provider APP
// Response containing Definition of Complete Token data
// 20.3
- public void getAccessTokenByFacebookAccessToken(String fbAccessToken, final AsyncHandler handler) {
+ public void getAccessTokenByFacebookAccessToken(String fbAccessToken, String socialAppName, final AsyncHandler handler) {
if (LoginRadiusValidator.isNullOrWhiteSpace(fbAccessToken)) {
throw new IllegalArgumentException(LoginRadiusValidator.getValidationMessage("fbAccessToken"));
@@ -49,6 +50,10 @@ public void getAccessTokenByFacebookAccessToken(String fbAccessToken, final Asyn
queryParameters.put("fb_Access_Token", fbAccessToken);
queryParameters.put("key", LoginRadiusSDK.getApiKey());
+ if (!LoginRadiusValidator.isNullOrWhiteSpace(socialAppName)) {
+ queryParameters.put("socialAppName", socialAppName);
+ }
+
String resourcePath = "api/v2/access_token/facebook";
LoginRadiusRequest.execute("GET", resourcePath, queryParameters, null, new AsyncHandler() {
@@ -72,11 +77,13 @@ public void onFailure(ErrorResponse errorResponse) {
//
// Twitter Access Token
// Twitter Token Secret
+ // Name of Social provider APP
// Response containing Definition of Complete Token data
// 20.4
- public void getAccessTokenByTwitterAccessToken(String twAccessToken, String twTokenSecret, final AsyncHandler handler) {
+ public void getAccessTokenByTwitterAccessToken(String twAccessToken, String twTokenSecret,
+ String socialAppName, final AsyncHandler handler) {
if (LoginRadiusValidator.isNullOrWhiteSpace(twAccessToken)) {
throw new IllegalArgumentException(LoginRadiusValidator.getValidationMessage("twAccessToken"));
@@ -91,6 +98,10 @@ public void getAccessTokenByTwitterAccessToken(String twAccessToken, String twTo
queryParameters.put("tw_Access_Token", twAccessToken);
queryParameters.put("tw_Token_Secret", twTokenSecret);
+ if (!LoginRadiusValidator.isNullOrWhiteSpace(socialAppName)) {
+ queryParameters.put("socialAppName", socialAppName);
+ }
+
String resourcePath = "api/v2/access_token/twitter";
LoginRadiusRequest.execute("GET", resourcePath, queryParameters, null, new AsyncHandler() {
@@ -114,13 +125,14 @@ public void onFailure(ErrorResponse errorResponse) {
//
// Google Access Token
// Google Client ID
- // LoginRadius refresh_token
+ // LoginRadius refresh token
+ // Name of Social provider APP
// Response containing Definition of Complete Token data
// 20.5
public void getAccessTokenByGoogleAccessToken(String googleAccessToken, String clientId,
- String refreshToken, final AsyncHandler handler) {
+ String refreshToken, String socialAppName, final AsyncHandler handler) {
if (LoginRadiusValidator.isNullOrWhiteSpace(googleAccessToken)) {
throw new IllegalArgumentException(LoginRadiusValidator.getValidationMessage("googleAccessToken"));
@@ -138,6 +150,10 @@ public void getAccessTokenByGoogleAccessToken(String googleAccessToken, String c
queryParameters.put("refresh_token", refreshToken);
}
+ if (!LoginRadiusValidator.isNullOrWhiteSpace(socialAppName)) {
+ queryParameters.put("socialAppName", socialAppName);
+ }
+
String resourcePath = "api/v2/access_token/google";
LoginRadiusRequest.execute("GET", resourcePath, queryParameters, null, new AsyncHandler() {
@@ -196,11 +212,12 @@ public void onFailure(ErrorResponse errorResponse) {
// The API is used to get LoginRadius access token by sending Linkedin's access token. It will be valid for the specific duration of time specified in the response.
//
// Linkedin Access Token
+ // Name of Social provider APP
// Response containing Definition of Complete Token data
// 20.7
- public void getAccessTokenByLinkedinAccessToken(String lnAccessToken, final AsyncHandler handler) {
+ public void getAccessTokenByLinkedinAccessToken(String lnAccessToken, String socialAppName, final AsyncHandler handler) {
if (LoginRadiusValidator.isNullOrWhiteSpace(lnAccessToken)) {
throw new IllegalArgumentException(LoginRadiusValidator.getValidationMessage("lnAccessToken"));
@@ -210,6 +227,10 @@ public void getAccessTokenByLinkedinAccessToken(String lnAccessToken, final Asyn
queryParameters.put("key", LoginRadiusSDK.getApiKey());
queryParameters.put("ln_Access_Token", lnAccessToken);
+ if (!LoginRadiusValidator.isNullOrWhiteSpace(socialAppName)) {
+ queryParameters.put("socialAppName", socialAppName);
+ }
+
String resourcePath = "api/v2/access_token/linkedin";
LoginRadiusRequest.execute("GET", resourcePath, queryParameters, null, new AsyncHandler() {
@@ -264,6 +285,83 @@ public void onFailure(ErrorResponse errorResponse) {
});
}
+ //
+ // The API is used to get LoginRadius access token by sending a valid Apple ID OAuth Code. It will be valid for the specific duration of time specified in the response.
+ //
+ // Apple Code
+ // Name of Social provider APP
+ // Response containing Definition of Complete Token data
+ // 20.12
+
+
+ public void getAccessTokenByAppleIdCode(String code, String socialAppName, final AsyncHandler handler) {
+
+ if (LoginRadiusValidator.isNullOrWhiteSpace(code)) {
+ throw new IllegalArgumentException(LoginRadiusValidator.getValidationMessage("code"));
+ }
+
+ Map queryParameters = new HashMap();
+ queryParameters.put("code", code);
+ queryParameters.put("key", LoginRadiusSDK.getApiKey());
+
+ if (!LoginRadiusValidator.isNullOrWhiteSpace(socialAppName)) {
+ queryParameters.put("socialAppName", socialAppName);
+ }
+
+ String resourcePath = "api/v2/access_token/apple";
+
+ LoginRadiusRequest.execute("GET", resourcePath, queryParameters, null, new AsyncHandler() {
+
+ @Override
+ public void onSuccess(String response) {
+ TypeToken typeToken = new TypeToken() {};
+ AccessTokenBase successResponse = JsonDeserializer.deserializeJson(response,typeToken);
+ handler.onSuccess(successResponse);
+ }
+
+ @Override
+ public void onFailure(ErrorResponse errorResponse) {
+ handler.onFailure(errorResponse);
+ }
+ });
+ }
+
+ //
+ // This API is used to retrieve a LoginRadius access token by passing in a valid WeChat OAuth Code.
+ //
+ // WeChat Code
+ // Response containing Definition of Complete Token data
+ // 20.13
+
+
+ public void getAccessTokenByWeChatCode(String code, final AsyncHandler handler) {
+
+ if (LoginRadiusValidator.isNullOrWhiteSpace(code)) {
+ throw new IllegalArgumentException(LoginRadiusValidator.getValidationMessage("code"));
+ }
+
+ Map queryParameters = new HashMap();
+ queryParameters.put("code", code);
+ queryParameters.put("key", LoginRadiusSDK.getApiKey());
+
+ String resourcePath = "api/v2/access_token/wechat";
+
+ LoginRadiusRequest.execute("GET", resourcePath, queryParameters, null, new AsyncHandler() {
+
+ @Override
+ public void onSuccess(String response) {
+ TypeToken typeToken = new TypeToken() {};
+ AccessTokenBase successResponse = JsonDeserializer.deserializeJson(response,typeToken);
+ handler.onSuccess(successResponse);
+ }
+
+ @Override
+ public void onFailure(ErrorResponse errorResponse) {
+ handler.onFailure(errorResponse);
+ }
+ });
+ }
+
//
// The API is used to get LoginRadius access token by sending Vkontakte's access token. It will be valid for the specific duration of time specified in the response.
//
@@ -304,11 +402,12 @@ public void onFailure(ErrorResponse errorResponse) {
// The API is used to get LoginRadius access token by sending Google's AuthCode. It will be valid for the specific duration of time specified in the response.
//
// Google AuthCode
+ // Name of Social provider APP
// Response containing Definition of Complete Token data
// 20.16
- public void getAccessTokenByGoogleAuthCode(String googleAuthcode, final AsyncHandler handler) {
+ public void getAccessTokenByGoogleAuthCode(String googleAuthcode, String socialAppName, final AsyncHandler handler) {
if (LoginRadiusValidator.isNullOrWhiteSpace(googleAuthcode)) {
throw new IllegalArgumentException(LoginRadiusValidator.getValidationMessage("googleAuthcode"));
@@ -318,6 +417,10 @@ public void getAccessTokenByGoogleAuthCode(String googleAuthcode, final AsyncHan
queryParameters.put("apiKey", LoginRadiusSDK.getApiKey());
queryParameters.put("google_authcode", googleAuthcode);
+ if (!LoginRadiusValidator.isNullOrWhiteSpace(socialAppName)) {
+ queryParameters.put("socialAppName", socialAppName);
+ }
+
String resourcePath = "api/v2/access_token/google";
LoginRadiusRequest.execute("GET", resourcePath, queryParameters, null, new AsyncHandler() {
diff --git a/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/api/social/SocialApi.java b/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/api/social/SocialApi.java
index a4140a1..65d7f87 100644
--- a/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/api/social/SocialApi.java
+++ b/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/api/social/SocialApi.java
@@ -92,12 +92,14 @@ public void onFailure(ErrorResponse errorResponse) {
// The Refresh Access Token API is used to refresh the provider access token after authentication. It will be valid for up to 60 days on LoginRadius depending on the provider. In order to use the access token in other APIs, always refresh the token using this API.
Supported Providers : Facebook,Yahoo,Google,Twitter, Linkedin.
Contact LoginRadius support team to enable this API.
//
// Uniquely generated identifier key by LoginRadius that is activated after successful authentication.
- // Allows you to specify a desired expiration time in minutes for the newly issued access_token.
+ // Allows you to specify a desired expiration time in minutes for the newly issued access token.
+ // Is web or not.
// Response containing Definition of Complete Token data
// 20.2
- public void refreshAccessToken(String accessToken, Integer expiresIn, final AsyncHandler handler) {
+ public void refreshAccessToken(String accessToken, Integer expiresIn,
+ Boolean isWeb, final AsyncHandler handler) {
if (LoginRadiusValidator.isNullOrWhiteSpace(accessToken)) {
throw new IllegalArgumentException(LoginRadiusValidator.getValidationMessage("accessToken"));
@@ -111,6 +113,10 @@ public void refreshAccessToken(String accessToken, Integer expiresIn, final Asyn
queryParameters.put("expiresIn", String.valueOf(expiresIn));
}
+ if (isWeb != null && isWeb) {
+ queryParameters.put("isWeb", String.valueOf(isWeb));
+ }
+
String resourcePath = "api/v2/access_token/refresh";
LoginRadiusRequest.execute("GET", resourcePath, queryParameters, null, new AsyncHandler() {
diff --git a/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/models/requestmodels/ExternalIds.java b/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/models/requestmodels/ExternalIds.java
index c11481a..1c1ff65 100644
--- a/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/models/requestmodels/ExternalIds.java
+++ b/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/models/requestmodels/ExternalIds.java
@@ -7,6 +7,7 @@
package com.loginradius.sdk.models.requestmodels;
import com.google.gson.annotations.SerializedName;
+import com.loginradius.sdk.models.enums.OperationType;
//
// Model Class containing Definition for Externallds Property
@@ -14,6 +15,9 @@
public class ExternalIds {
+ @SerializedName("Op")
+ private OperationType op;
+
@SerializedName("Source")
private String source;
@@ -22,6 +26,18 @@ public class ExternalIds {
+ //
+ // Languages operation Type
+ //
+ public OperationType getOp() {
+ return op;
+ }
+ //
+ // Languages operation Type
+ //
+ public void setOp(OperationType op) {
+ this.op = op;
+ }
//
// ExternalId source
//
diff --git a/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/models/requestmodels/Languages.java b/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/models/requestmodels/Languages.java
index 49bd367..6a8ec0c 100644
--- a/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/models/requestmodels/Languages.java
+++ b/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/models/requestmodels/Languages.java
@@ -21,7 +21,7 @@ public class Languages {
@SerializedName("Name")
private String name;
- @SerializedName("op")
+ @SerializedName("Op")
private OperationType op;
@SerializedName("Proficiency")
diff --git a/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/models/responsemodels/otherobjects/PINInformation.java b/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/models/responsemodels/otherobjects/PINInformation.java
index e235d13..6c9571f 100644
--- a/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/models/responsemodels/otherobjects/PINInformation.java
+++ b/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/models/responsemodels/otherobjects/PINInformation.java
@@ -17,6 +17,9 @@ public class PINInformation {
@SerializedName("LastPINChangeDate")
private String lastPINChangeDate;
+ @SerializedName("LastPINChangeToken")
+ private String lastPINChangeToken;
+
@SerializedName("PIN")
private String pin;
@@ -41,6 +44,18 @@ public void setLastPINChangeDate(String lastPINChangeDate) {
this.lastPINChangeDate = lastPINChangeDate;
}
//
+ // Last PIN Change Token
+ //
+ public String getLastPINChangeToken() {
+ return lastPINChangeToken;
+ }
+ //
+ // Last PIN Change Token
+ //
+ public void setLastPINChangeToken(String lastPINChangeToken) {
+ this.lastPINChangeToken = lastPINChangeToken;
+ }
+ //
// PIN of user
//
public String getPIN() {
diff --git a/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/util/ErrorResponse.java b/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/util/ErrorResponse.java
index b15a00d..c4d8c25 100644
--- a/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/util/ErrorResponse.java
+++ b/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/util/ErrorResponse.java
@@ -151,7 +151,7 @@ public Object getData() {
/**
*
- * @param Errors The Data
+ * @param Data The Data
*/
public void setData(Object Data) {
diff --git a/README.md b/README.md
index 5a1ab9d..6c29aeb 100644
--- a/README.md
+++ b/README.md
@@ -28,7 +28,7 @@ Use the following dependency in your project:
com.loginradius.sdk
java-sdk
- 10.0.2
+ 11.0.0
```
@@ -50,7 +50,7 @@ Java Library
## Installation
-This documentation presumes you have worked through the client-side implementation to setup your LoginRadius User Registration interfaces that will service the initial registration and login process. Details on this can be found in the [getting started guide.](/api/v2/getting-started/introduction)
+This documentation presumes you have worked through the client-side implementation to setup your LoginRadius User Registration interfaces that will service the initial registration and login process. Details on this can be found in the [getting started guide.](https://www.loginradius.com/docs/api/v2/getting-started/introduction)
Use the following dependency in your project:
@@ -67,7 +67,7 @@ Select the directory for the latest version and download the jar files.
## Initialize SDK
Before using the SDK, you must initialize the SDK with the help of following code:
-API Key and secret of your LoginRadius site. You can get one from [here](/api/v2/admin-console/platform-security/api-key-and-secret/#api-key-and-secret)
+API Key and secret of your LoginRadius site. You can get one from [here](https://www.loginradius.com/docs/api/v2/admin-console/platform-security/api-key-and-secret/#api-key-and-secret)
```
LoginRadiusSDK.Initialize init = new LoginRadiusSDK.Initialize();
@@ -93,7 +93,7 @@ init.setRequestSigning(true);
The User Registration system relies on two identifiers which you can retrieve as follows:
-Pass the token returned in the User Registration login response to the code behind. You can use a javascript function in the login and sociallogin onSuccess functions. Additional details on setting up and configuring your interface is available [here](/api/v2/deployment/js-libraries/getting-started/#user-registration-getting-started). You can set the action in the redirect function to the desired servlet or .jsp.
+Pass the token returned in the User Registration login response to the code behind. You can use a javascript function in the login and sociallogin onSuccess functions. Additional details on setting up and configuring your interface is available [here](https://www.loginradius.com/docs/api/v2/deployment/js-libraries/getting-started/#user-registration-getting-started). You can set the action in the redirect function to the desired servlet or .jsp.
```
function redirect(token) {
@@ -197,13 +197,14 @@ List of APIs in this Section:
* PUT : [Auth Reset Password by OTP](#ResetPasswordByEmailOTP-put-)
* PUT : [Auth Reset Password by OTP and UserName](#ResetPasswordByOTPAndUserName-put-)
* PUT : [Auth Change Password](#ChangePassword-put-)
-* PUT : [Auth Link Social Identities](#LinkSocialIdentities-put-)
* PUT : [Auth Set or Change UserName](#SetOrChangeUserName-put-)
* PUT : [Auth Resend Email Verification](#AuthResendEmailVerification-put-)
* POST : [Auth Add Email](#AddEmail-post-)
* POST : [Auth Login by Email](#LoginByEmail-post-)
* POST : [Auth Login by Username](#LoginByUserName-post-)
* POST : [Auth Forgot Password](#ForgotPassword-post-)
+* POST : [Auth Link Social Identities](#LinkSocialIdentities-post-)
+* POST : [Auth Link Social Identities By Ping](#LinkSocialIdentitiesByPing-post-)
* POST : [Auth User Registration by Email](#UserRegistrationByEmail-post-)
* POST : [Auth User Registration By Captcha](#UserRegistrationByCaptcha-post-)
* GET : [Get Security Questions By Email](#GetSecurityQuestionsByEmail-get-)
@@ -218,7 +219,6 @@ List of APIs in this Section:
* GET : [Auth Delete Account](#DeleteAccountByDeleteToken-get-)
* GET : [Auth Check Email Availability](#CheckEmailAvailability-get-)
* GET : [Auth Verify Email](#VerifyEmail-get-)
-* GET : [Auth Social Identity](#GetSocialIdentity-get-)
* GET : [Auth Check UserName Availability](#CheckUserNameAvailability-get-)
* GET : [Auth Privacy Policy Accept](#AcceptPrivacyPolicy-get-)
* GET : [Auth Privacy Policy History By Access Token](#GetPrivacyPolicyHistoryByAccessToken-get-)
@@ -230,7 +230,7 @@ List of APIs in this Section:
Auth Update Profile by Token (PUT)
- This API is used to update the user's profile by passing the access_token. [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-update-profile-by-token/)
+ This API is used to update the user's profile by passing the access token. [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-update-profile-by-token/)
```
@@ -265,7 +265,7 @@ authenticationApi.updateProfileByAccessToken(accessToken, userProfileUpdateMode
Auth Unlock Account by Access Token (PUT)
- This API is used to allow a customer with a valid access_token to unlock their account provided that they successfully pass the prompted Bot Protection challenges. The Block or Suspend block types are not applicable for this API. For additional details see our Auth Security Configuration documentation.You are only required to pass the Post Parameters that correspond to the prompted challenges. [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-unlock-account-by-access-token/)
+ This API is used to allow a customer with a valid access token to unlock their account provided that they successfully pass the prompted Bot Protection challenges. The Block or Suspend block types are not applicable for this API. For additional details see our Auth Security Configuration documentation.You are only required to pass the Post Parameters that correspond to the prompted challenges. [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-unlock-account-by-access-token/)
```
@@ -539,34 +539,6 @@ authenticationApi.changePassword(accessToken, newPassword, oldPassword , new As
-Auth Link Social Identities (PUT)
- This API is used to link up a social provider account with the specified account based on the access token and the social providers user access token. [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-link-social-identities)
-
-```
-
-String accessToken = ""; //Required
-String candidateToken = ""; //Required
-
-AuthenticationApi authenticationApi = new AuthenticationApi();
-authenticationApi.linkSocialIdentities(accessToken, candidateToken , new AsyncHandler (){
-
-@Override
- public void onFailure(ErrorResponse errorResponse) {
- System.out.println(errorResponse.getDescription());
- }
- @Override
- public void onSuccess(PostResponse response) {
- System.out.println(response.getIsPosted());
- }
-});
-
-```
-
-
-
-
-
-
Auth Set or Change UserName (PUT)
This API is used to set or change UserName by access token. [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-set-or-change-user-name/)
@@ -750,6 +722,62 @@ authenticationApi.forgotPassword(email, resetPasswordUrl, emailTemplate , new A
+Auth Link Social Identities (POST)
+ This API is used to link up a social provider account with an existing LoginRadius account on the basis of access token and the social providers user access token. [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-link-social-identities)
+
+```
+
+String accessToken = ""; //Required
+String candidateToken = ""; //Required
+
+AuthenticationApi authenticationApi = new AuthenticationApi();
+authenticationApi.linkSocialIdentities(accessToken, candidateToken , new AsyncHandler (){
+
+@Override
+ public void onFailure(ErrorResponse errorResponse) {
+ System.out.println(errorResponse.getDescription());
+ }
+ @Override
+ public void onSuccess(PostResponse response) {
+ System.out.println(response.getIsPosted());
+ }
+});
+
+```
+
+
+
+
+
+
+Auth Link Social Identities By Ping (POST)
+ This API is used to link up a social provider account with an existing LoginRadius account on the basis of ping and the social providers user access token. [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-link-social-identities-by-ping)
+
+```
+
+String accessToken = ""; //Required
+String clientGuid = ""; //Required
+
+AuthenticationApi authenticationApi = new AuthenticationApi();
+authenticationApi.linkSocialIdentitiesByPing(accessToken, clientGuid , new AsyncHandler (){
+
+@Override
+ public void onFailure(ErrorResponse errorResponse) {
+ System.out.println(errorResponse.getDescription());
+ }
+ @Override
+ public void onSuccess(PostResponse response) {
+ System.out.println(response.getIsPosted());
+ }
+});
+
+```
+
+
+
+
+
+
Auth User Registration by Email (POST)
This API creates a user in the database as well as sends a verification email to the user. [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-user-registration-by-email)
@@ -1026,7 +1054,7 @@ authenticationApi.getAccessTokenInfo(accessToken , new AsyncHandlerAuth Read all Profiles by Token (GET)
- This API retrieves a copy of the user data based on the access_token. [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-read-profiles-by-token/)
+ This API retrieves a copy of the user data based on the access token. [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-read-profiles-by-token/)
```
@@ -1165,34 +1193,6 @@ authenticationApi.verifyEmail(verificationToken, fields, url, welcomeEmailTempla
-Auth Social Identity (GET)
- This API is called just after account linking API and it prevents the raas profile of the second account from getting created. [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-social-identity)
-
-```
-
-String accessToken = ""; //Required
-String fields = null; //Optional
-
-AuthenticationApi authenticationApi = new AuthenticationApi();
-authenticationApi.getSocialIdentity(accessToken, fields , new AsyncHandler (){
-
-@Override
- public void onFailure(ErrorResponse errorResponse) {
- System.out.println(errorResponse.getDescription());
- }
- @Override
- public void onSuccess(SocialUserProfile response) {
- System.out.println(response.getAbout());
- }
-});
-
-```
-
-
-
-
-
-
Auth Check UserName Availability (GET)
This API is used to check the UserName exists or not on your site. [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-username-availability/)
@@ -1221,7 +1221,7 @@ authenticationApi.checkUserNameAvailability(username , new AsyncHandlerAuth Privacy Policy Accept (GET)
- This API is used to update the privacy policy stored in the user's profile by providing the access_token of the user accepting the privacy policy [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-privacy-policy-accept)
+ This API is used to update the privacy policy stored in the user's profile by providing the access token of the user accepting the privacy policy [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-privacy-policy-accept)
```
@@ -1249,7 +1249,7 @@ authenticationApi.acceptPrivacyPolicy(accessToken, fields , new AsyncHandlerAuth Privacy Policy History By Access Token (GET)
- This API will return all the accepted privacy policies for the user by providing the access_token of that user. [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/privacy-policy-history-by-access-token/)
+ This API will return all the accepted privacy policies for the user by providing the access token of that user. [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/privacy-policy-history-by-access-token/)
```
@@ -1375,7 +1375,6 @@ List of APIs in this Section:
* PUT : [Account Invalidate Verification Email](#InvalidateAccountEmailVerification-put-)
* PUT : [Reset phone ID verification](#ResetPhoneIDVerificationByUid-put-)
* PUT : [Upsert Email](#UpsertEmail-put-)
-* PUT : [Update UID](#AccountUpdateUid-put-)
* POST : [Account Create](#CreateAccount-post-)
* POST : [Forgot Password token](#GetForgotPasswordToken-post-)
* POST : [Email Verification token](#GetEmailVerificationToken-post-)
@@ -1576,36 +1575,6 @@ accountApi.upsertEmail( upsertEmailModel, uid, fields , new AsyncHandlerUpdate UID (PUT)
- This API is used to update a user's Uid. It will update all profiles, custom objects and consent management logs associated with the Uid. [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/account-update/)
-
-```
-
-UpdateUidModel updateUidModel = new UpdateUidModel(); //Required
-updateUidModel.setNewUid("newUid");
-String uid = ""; //Required
-
-AccountApi accountApi = new AccountApi();
-accountApi.accountUpdateUid( updateUidModel, uid , new AsyncHandler (){
-
-@Override
- public void onFailure(ErrorResponse errorResponse) {
- System.out.println(errorResponse.getDescription());
- }
- @Override
- public void onSuccess(PostResponse response) {
- System.out.println(response.getIsPosted());
- }
-});
-
-```
-
-
-
-
-
-
Account Create (POST)
This API is used to create an account in Cloud Storage. This API bypass the normal email verification process and manually creates the user.
In order to use this API, you need to format a JSON request body with all of the mandatory fields [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/account-create)
@@ -1894,7 +1863,7 @@ accountApi.getAccessTokenByUid(uid , new AsyncHandler (){
Refresh Access Token by Refresh Token (GET)
- This API is used to refresh an access_token via it's associated refresh_token. [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/refresh-token/refresh-access-token-by-refresh-token)
+ This API is used to refresh an access token via it's associated refresh token. [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/refresh-token/refresh-access-token-by-refresh-token)
```
@@ -2236,9 +2205,10 @@ socialApi.exchangeAccessToken(token , new AsyncHandler (){
String accessToken = ""; //Required
Integer expiresIn = 0; //Optional
+Boolean isWeb = true; //Optional
SocialApi socialApi = new SocialApi();
-socialApi.refreshAccessToken(accessToken, expiresIn , new AsyncHandler (){
+socialApi.refreshAccessToken(accessToken, expiresIn, isWeb , new AsyncHandler (){
@Override
public void onFailure(ErrorResponse errorResponse) {
@@ -3700,7 +3670,7 @@ phoneAuthenticationApi.checkPhoneNumberAvailability(phone , new AsyncHandlerRemove Phone ID by Access Token (DELETE)
- This API is used to delete the Phone ID on a user's account via the access_token [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/phone-authentication/remove-phone-id-by-access-token)
+ This API is used to delete the Phone ID on a user's account via the access token [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/phone-authentication/remove-phone-id-by-access-token)
```
@@ -3910,7 +3880,7 @@ multiFactorAuthenticationApi.mfaValidateGoogleAuthCode(googleAuthenticatorCode,
MFA Validate Backup code (PUT)
- This API is used to validate the backup code provided by the user and if valid, we return an access_token allowing the user to login incases where Multi-factor authentication (MFA) is enabled and the secondary factor is unavailable. When a user initially downloads the Backup codes, We generate 10 codes, each code can only be consumed once. if any user attempts to go over the number of invalid login attempts configured in the Dashboard then the account gets blocked automatically [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/backup-codes/mfa-validate-backup-code/)
+ This API is used to validate the backup code provided by the user and if valid, we return an access token allowing the user to login incases where Multi-factor authentication (MFA) is enabled and the secondary factor is unavailable. When a user initially downloads the Backup codes, We generate 10 codes, each code can only be consumed once. if any user attempts to go over the number of invalid login attempts configured in the Dashboard then the account gets blocked automatically [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/backup-codes/mfa-validate-backup-code/)
```
@@ -4071,7 +4041,7 @@ multiFactorAuthenticationApi.mfaLoginByPhone(password, phone, emailTemplate, fie
- This API is used to configure the Multi-factor authentication after login by using the access_token when MFA is set as optional on the LoginRadius site. [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/mfa-validate-access-token/)
+ This API is used to configure the Multi-factor authentication after login by using the access token when MFA is set as optional on the LoginRadius site. [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/mfa-validate-access-token/)
```
@@ -4099,7 +4069,7 @@ multiFactorAuthenticationApi.mfaConfigureByAccessToken(accessToken, smsTemplate2
MFA Backup Code by Access Token (GET)
- This API is used to get a set of backup codes via access_token to allow the user login on a site that has Multi-factor Authentication enabled in the event that the user does not have a secondary factor available. We generate 10 codes, each code can only be consumed once. If any user attempts to go over the number of invalid login attempts configured in the Dashboard then the account gets blocked automatically [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/backup-codes/mfa-backup-code-by-access-token/)
+ This API is used to get a set of backup codes via access token to allow the user login on a site that has Multi-factor Authentication enabled in the event that the user does not have a secondary factor available. We generate 10 codes, each code can only be consumed once. If any user attempts to go over the number of invalid login attempts configured in the Dashboard then the account gets blocked automatically [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/backup-codes/mfa-backup-code-by-access-token/)
```
@@ -4126,7 +4096,7 @@ multiFactorAuthenticationApi.mfaBackupCodeByAccessToken(accessToken , new Async
Reset Backup Code by Access Token (GET)
- API is used to reset the backup codes on a given account via the access_token. This API call will generate 10 new codes, each code can only be consumed once [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/backup-codes/mfa-reset-backup-code-by-access-token/)
+ API is used to reset the backup codes on a given account via the access token. This API call will generate 10 new codes, each code can only be consumed once [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/backup-codes/mfa-reset-backup-code-by-access-token/)
```
@@ -4235,7 +4205,7 @@ multiFactorAuthenticationApi.mfaResetBackupCodeByUid(uid , new AsyncHandlerMFA Reset Google Authenticator by Token (DELETE)
- This API Resets the Google Authenticator configurations on a given account via the access_token [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/google-authenticator/mfa-reset-google-authenticator-by-token/)
+ This API Resets the Google Authenticator configurations on a given account via the access token [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/google-authenticator/mfa-reset-google-authenticator-by-token/)
```
@@ -4263,7 +4233,7 @@ multiFactorAuthenticationApi.mfaResetGoogleAuthByToken(accessToken, googleauthen
MFA Reset SMS Authenticator by Token (DELETE)
- This API resets the SMS Authenticator configurations on a given account via the access_token. [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/sms-authenticator/mfa-reset-sms-authenticator-by-token/)
+ This API resets the SMS Authenticator configurations on a given account via the access token. [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/sms-authenticator/mfa-reset-sms-authenticator-by-token/)
```
@@ -4618,7 +4588,7 @@ pinAuthenticationApi.resetPINByUsernameAndOtp( resetPINByUsernameAndOtpModel ,
PIN Login (POST)
- This API is used to login a user by pin and session_token. [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/pin-authentication/login-by-pin/)
+ This API is used to login a user by pin and session token. [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/pin-authentication/login-by-pin/)
```
@@ -4842,7 +4812,7 @@ reAuthenticationApi.mfaReAuthenticateByOTP(accessToken, reauthByOtpModel , new
Validate MFA by Backup Code (PUT)
- This API is used to re-authenticate by set of backup codes via access_token on the site that has Multi-factor authentication enabled in re-authentication for the user that does not have the device [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/re-authentication/mfa/re-auth-by-backup-code/)
+ This API is used to re-authenticate by set of backup codes via access token on the site that has Multi-factor authentication enabled in re-authentication for the user that does not have the device [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/re-authentication/mfa/re-auth-by-backup-code/)
```
@@ -5047,7 +5017,7 @@ reAuthenticationApi.verifyMultiFactorPINReauthentication( eventBasedMultiFactorT
Multi Factor Re-Authenticate (GET)
- This API is used to trigger the Multi-Factor Autentication workflow for the provided access_token [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/re-authentication/re-auth-trigger/)
+ This API is used to trigger the Multi-Factor Autentication workflow for the provided access token [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/re-authentication/re-auth-trigger/)
```
@@ -5207,7 +5177,7 @@ consentManagementApi.submitConsentByAccessToken(accessToken, consentSubmitModel
Get Consent Logs By Uid (GET)
- This API is used to get the Consent logs of the user. [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/customer-identity-api/consent-management/consent-log-by-uid/)
+ This API is used to get the Consent logs of the user. [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/consent-management/consent-log-by-uid/)
```
@@ -6344,7 +6314,7 @@ customRegistrationDataApi.validateRegistrationDataCode(code, recordId , new Asy
Add Registration Data (POST)
- This API allows you to fill data into a dropdown list which you have created for user Registeration. For more details on how to use this API please see our Custom Registration Data Overview [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/custom-registration-data/add-registration-data)
+ This API allows you to fill data into a dropdown list which you have created for user Registration. For more details on how to use this API please see our Custom Registration Data Overview [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/custom-registration-data/add-registration-data)
```
@@ -6701,6 +6671,8 @@ List of APIs in this Section:
* GET : [Access Token using google JWT token for Native Mobile Login](#GetAccessTokenByGoogleJWTAccessToken-get-)
* GET : [Access Token via Linkedin Token](#GetAccessTokenByLinkedinAccessToken-get-)
* GET : [Get Access Token By Foursquare Access Token](#GetAccessTokenByFoursquareAccessToken-get-)
+* GET : [Access Token via Apple Id Code](#GetAccessTokenByAppleIdCode-get-)
+* GET : [Access Token via WeChat Code](#GetAccessTokenByWeChatCode-get-)
* GET : [Access Token via Vkontakte Token](#GetAccessTokenByVkontakteAccessToken-get-)
* GET : [Access Token via Google AuthCode](#GetAccessTokenByGoogleAuthCode-get-)
@@ -6713,9 +6685,10 @@ List of APIs in this Section:
```
String fbAccessToken = ""; //Required
+String socialAppName = ""; //Optional
NativeSocialApi nativeSocialApi = new NativeSocialApi();
-nativeSocialApi.getAccessTokenByFacebookAccessToken(fbAccessToken , new AsyncHandler (){
+nativeSocialApi.getAccessTokenByFacebookAccessToken(fbAccessToken, socialAppName , new AsyncHandler (){
@Override
public void onFailure(ErrorResponse errorResponse) {
@@ -6741,9 +6714,10 @@ nativeSocialApi.getAccessTokenByFacebookAccessToken(fbAccessToken , new AsyncHa
String twAccessToken = ""; //Required
String twTokenSecret = ""; //Required
+String socialAppName = ""; //Optional
NativeSocialApi nativeSocialApi = new NativeSocialApi();
-nativeSocialApi.getAccessTokenByTwitterAccessToken(twAccessToken, twTokenSecret , new AsyncHandler (){
+nativeSocialApi.getAccessTokenByTwitterAccessToken(twAccessToken, twTokenSecret, socialAppName , new AsyncHandler (){
@Override
public void onFailure(ErrorResponse errorResponse) {
@@ -6770,9 +6744,10 @@ nativeSocialApi.getAccessTokenByTwitterAccessToken(twAccessToken, twTokenSecret
String googleAccessToken = ""; //Required
String clientId = ""; //Optional
String refreshToken = ""; //Optional
+String socialAppName = ""; //Optional
NativeSocialApi nativeSocialApi = new NativeSocialApi();
-nativeSocialApi.getAccessTokenByGoogleAccessToken(googleAccessToken, clientId, refreshToken , new AsyncHandler (){
+nativeSocialApi.getAccessTokenByGoogleAccessToken(googleAccessToken, clientId, refreshToken, socialAppName , new AsyncHandler (){
@Override
public void onFailure(ErrorResponse errorResponse) {
@@ -6824,9 +6799,10 @@ nativeSocialApi.getAccessTokenByGoogleJWTAccessToken(idToken , new AsyncHandler
```
String lnAccessToken = ""; //Required
+String socialAppName = ""; //Optional
NativeSocialApi nativeSocialApi = new NativeSocialApi();
-nativeSocialApi.getAccessTokenByLinkedinAccessToken(lnAccessToken , new AsyncHandler (){
+nativeSocialApi.getAccessTokenByLinkedinAccessToken(lnAccessToken, socialAppName , new AsyncHandler (){
@Override
public void onFailure(ErrorResponse errorResponse) {
@@ -6872,6 +6848,61 @@ nativeSocialApi.getAccessTokenByFoursquareAccessToken(fsAccessToken , new Async
+Access Token via Apple Id Code (GET)
+ The API is used to get LoginRadius access token by sending a valid Apple ID OAuth Code. It will be valid for the specific duration of time specified in the response. [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/native-social-login-api/access-token-via-apple-id-code)
+
+```
+
+String code = ""; //Required
+String socialAppName = ""; //Optional
+
+NativeSocialApi nativeSocialApi = new NativeSocialApi();
+nativeSocialApi.getAccessTokenByAppleIdCode(code, socialAppName , new AsyncHandler (){
+
+@Override
+ public void onFailure(ErrorResponse errorResponse) {
+ System.out.println(errorResponse.getDescription());
+ }
+ @Override
+ public void onSuccess(AccessTokenBase response) {
+ System.out.println(response.getAccess_Token());
+ }
+});
+
+```
+
+
+
+
+
+
+Access Token via WeChat Code (GET)
+ This API is used to retrieve a LoginRadius access token by passing in a valid WeChat OAuth Code. [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/native-social-login-api/access-token-via-wechat-code)
+
+```
+
+String code = ""; //Required
+
+NativeSocialApi nativeSocialApi = new NativeSocialApi();
+nativeSocialApi.getAccessTokenByWeChatCode(code , new AsyncHandler (){
+
+@Override
+ public void onFailure(ErrorResponse errorResponse) {
+ System.out.println(errorResponse.getDescription());
+ }
+ @Override
+ public void onSuccess(AccessTokenBase response) {
+ System.out.println(response.getAccess_Token());
+ }
+});
+
+```
+
+
+
+
+
+
Access Token via Vkontakte Token (GET)
The API is used to get LoginRadius access token by sending Vkontakte's access token. It will be valid for the specific duration of time specified in the response. [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/native-social-login-api/access-token-via-vkontakte-token)
@@ -6905,9 +6936,10 @@ nativeSocialApi.getAccessTokenByVkontakteAccessToken(vkAccessToken , new AsyncH
```
String googleAuthcode = ""; //Required
+String socialAppName = ""; //Optional
NativeSocialApi nativeSocialApi = new NativeSocialApi();
-nativeSocialApi.getAccessTokenByGoogleAuthCode(googleAuthcode , new AsyncHandler (){
+nativeSocialApi.getAccessTokenByGoogleAuthCode(googleAuthcode, socialAppName , new AsyncHandler (){
@Override
public void onFailure(ErrorResponse errorResponse) {
@@ -7098,10 +7130,4 @@ IDE:
## Reference Manual
-Please find the reference manual [here](http://docs.lrcontent.com/apidocs/ref/java/index.html).
-
-
-
-
-
-
+Please find the reference manual [here](http://docs.lrcontent.com/apidocs/ref/java/index.html).
\ No newline at end of file
diff --git a/demo/pom.xml b/demo/pom.xml
index f32cc2d..0ea7dff 100644
--- a/demo/pom.xml
+++ b/demo/pom.xml
@@ -52,7 +52,7 @@
com.loginradius.sdk
java-sdk
- 10.0.2
+ 11.0.0