Skip to content

Commit 5e549ee

Browse files
committed
Released Version 3.2.0
# Enhancements - Added new access token API based on UID (user impersonation) - Added new Auto Login APIs - Added new backup code API in case of device lost and Google Authenticator enabled. - Significantly improved code performance. # Bug Fixes - Issue with NULL Support at Update Account APIs.
1 parent 71d5157 commit 5e549ee

File tree

58 files changed

+904
-765
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+904
-765
lines changed

CHANGELOG.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
1-
> **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://docs.loginradius.com/api/v2/sdk-libraries/java-library)
1+
> **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://github.com/LoginRadius/java-sdk)
22
33

4+
### Version 3.2.0
5+
Released on **june 15, 2017**
6+
7+
##### Enhancements
8+
9+
- Added new access token API based on UID (user impersonation)
10+
- Added new Auto Login APIs
11+
- Added new backup code API in case of device lost and Google Authenticator enabled.
12+
- Significantly improved code performance.
13+
14+
##### Bug Fixes
15+
- Issue with NULL Support at Update Account APIs.
16+
417

518
### Version 3.1.0
619
Released on **May 10, 2017**

README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ LoginRadius helps businesses boost user engagement on their web/mobile platform,
1717
Please visit [here](http://www.loginradius.com/) for more information.
1818

1919

20-
21-
22-
# Installing
23-
24-
2520
# Installing
2621

2722
LoginRadius is now using Maven. At present the jars *are* available from a public [maven]( http://search.maven.org/#search%7Cga%7C1%7Cloginradius) repository.
@@ -32,9 +27,11 @@ Use the following dependency in your project:
3227
<dependency>
3328
<groupId>com.loginradius.sdk</groupId>
3429
<artifactId>java-sdk</artifactId>
35-
<version>3.1.0</version>
30+
<version>3.2.0</version>
3631
</dependency>
3732
33+
```
34+
3835
The jars are also available [here](http://search.maven.org/#search%7Cga%7C1%7Cloginradius). Select the directory for
3936
the latest version and download the jar files.
4037

Binary file not shown.
Binary file not shown.

demo/LoginRadiusJavaDemo/target/m2e-wtp/web-resources/META-INF/maven/LoginRadiusJavaDemo/LoginRadiusJavaDemo/pom.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#Generated by Maven Integration for Eclipse
2-
#Wed May 10 17:03:05 IST 2017
2+
#Fri Jun 02 13:39:06 IST 2017
33
version=0.0.1-SNAPSHOT
44
groupId=LoginRadiusJavaDemo
55
m2e.projectName=LoginRadiusJavaDemo

sdk/LoginRadius-JavaSDK/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.loginradius.sdk</groupId>
88
<artifactId>java-sdk</artifactId>
9-
<version>3.1.0</version>
9+
<version>3.2.0</version>
1010
<description>LoginRadius java SDK contains registration and social APIs</description>
1111
<url>https://github.com/LoginRadius/java-sdk</url>
1212

sdk/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/advanced/api/AdvancedGetAPI.java

Lines changed: 23 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
package com.loginradius.sdk.advanced.api;
22

3+
4+
/*
5+
*
6+
* Created by LoginRadius Development Team on 02/06/2017
7+
Copyright © 2017 LoginRadius Inc. All rights reserved.
8+
9+
*/
10+
311
import java.util.HashMap;
412
import java.util.Map;
513

@@ -8,7 +16,7 @@
816
import com.loginradius.sdk.util.ArgumentValidator;
917

1018
public class AdvancedGetAPI extends LRAdvancedAPI {
11-
19+
1220
private String method = "";
1321
private String finalpath = "";
1422

@@ -38,50 +46,38 @@ public String getResponse(String token) {
3846
params.putAll(map);
3947

4048
}
41-
42-
43-
44-
if ("tokenvalidate".equals(method )) {
49+
50+
if ("tokenvalidate".equals(method)) {
4551
params.put("access_token", token);
4652
finalpath = Endpoint.getExchangetoken() + "/Validate";
47-
}
48-
else if ("tokeninvalidate".equals(method )) {
53+
} else if ("tokeninvalidate".equals(method)) {
4954
params.put("access_token", token);
5055
finalpath = Endpoint.getExchangetoken() + "/invalidate";
51-
}
52-
else if ("testresthookssettings".equals(method )) {
56+
} else if ("testresthookssettings".equals(method)) {
5357
finalpath = Endpoint.getV2_AdvancedRestHooksSettings();
54-
}
55-
else if ("listofresthooks".equals(method )) {
58+
} else if ("listofresthooks".equals(method)) {
5659
finalpath = Endpoint.getV2_AdvancedListofRestHooks();
57-
}else if ("getsubscribedurl".equals(method )) {
60+
} else if ("getsubscribedurl".equals(method)) {
5861
finalpath = Endpoint.getV2_AdvancedGetSubscribedurl();
59-
}
60-
else if ("accesstokenviafbtoken".equals(method )) {
62+
} else if ("accesstokenviafbtoken".equals(method)) {
6163
finalpath = Endpoint.getV2_AdvancedAccessTokenViaSocialToken() + "facebook";
62-
}
63-
else if ("accesstokenviatwtoken".equals(method )) {
64+
} else if ("accesstokenviatwtoken".equals(method)) {
6465
finalpath = Endpoint.getV2_AdvancedAccessTokenViaSocialToken() + "twitter";
65-
}
66-
else if ("refreshprofile".equals(method )) {
66+
} else if ("refreshprofile".equals(method)) {
6767
params.put("access_token", token);
6868
finalpath = Endpoint.getV2_AdvancedRefreshUserProfile();
69-
}else if ("refreshtoken".equals(method )) {
69+
} else if ("refreshtoken".equals(method)) {
7070
params.put("access_token", token);
7171
finalpath = Endpoint.getV2_AdvancedRefreshToken();
72-
}
73-
else if ("shortenURL".equals(method )) {
72+
} else if ("shortenURL".equals(method)) {
7473
finalpath = Endpoint.getV2_AdvancedShortenURL();
75-
}
76-
else if ("trackablestatusfetching".equals(method )) {
74+
} else if ("trackablestatusfetching".equals(method)) {
7775
finalpath = Endpoint.getV2_STATUS() + "/trackable";
78-
}
79-
else if ("gettrackablestatusstats".equals(method )) {
76+
} else if ("gettrackablestatusstats".equals(method)) {
8077
params.put("access_token", token);
8178
finalpath = Endpoint.getV2_STATUS() + "/trackable/js";
8279
}
83-
84-
80+
8581
return executeGet(finalpath, params);
8682

8783
}

sdk/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/advanced/api/AdvancedPostAPI.java

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
package com.loginradius.sdk.advanced.api;
22

3+
4+
/*
5+
*
6+
* Created by LoginRadius Development Team on 02/06/2017
7+
Copyright © 2017 LoginRadius Inc. All rights reserved.
8+
9+
*/
10+
311
import java.util.HashMap;
412
import java.util.Map;
513

@@ -52,38 +60,30 @@ public String getResponse(String token) {
5260

5361
}
5462

55-
56-
57-
if ("getsocialidentity".equals(method )) {
63+
if ("getsocialidentity".equals(method)) {
5864
finalpath = Endpoint.getV2_AdvancedIdentity();
59-
}
60-
else if ("querydata".equals(method )) {
65+
} else if ("querydata".equals(method)) {
6166
finalpath = Endpoint.getV2_AdvancedQueryData();
62-
}
63-
else if ("subscriberesthooks".equals(method )) {
67+
} else if ("subscriberesthooks".equals(method)) {
6468
finalpath = Endpoint.getV2_AdvancedSubscribeRestHooks();
65-
}
66-
else if ("unsubscriberesthooks".equals(method )) {
69+
} else if ("unsubscriberesthooks".equals(method)) {
6770
finalpath = Endpoint.getV2_AdvancedUnsubscribeRestHooks();
68-
}else if ("addemail".equals(method )) {
71+
} else if ("addemail".equals(method)) {
6972
params.put("access_token", token);
7073
finalpath = Endpoint.getAddEmailUrl();
71-
}
72-
else if ("createcustomobject".equals(method )) {
74+
} else if ("createcustomobject".equals(method)) {
7375
params.put("access_token", token);
7476
finalpath = Endpoint.getCustomObject();
75-
}
76-
else if ("forgotpasswordbyotp".equals(method )) {
77+
} else if ("forgotpasswordbyotp".equals(method)) {
7778
finalpath = Endpoint.getForgotPasswordUrlMobile();
78-
}
79-
else if ("resendotp".equals(method )) {
79+
} else if ("resendotp".equals(method)) {
8080
finalpath = Endpoint.getVerifyotpUrl();
81-
}else if ("resendotpbytoken".equals(method )) {
81+
} else if ("resendotpbytoken".equals(method)) {
8282
params.put("access_token", token);
8383
finalpath = Endpoint.getVerifyotpUrl();
84-
}else if ("forgotpasswordbyemail".equals(method )) {
84+
} else if ("forgotpasswordbyemail".equals(method)) {
8585
finalpath = Endpoint.getForgotPasswordUrlEmail();
86-
}else if ("trackablestatusposting".equals(method )) {
86+
} else if ("trackablestatusposting".equals(method)) {
8787
params.put("access_token", token);
8888
finalpath = Endpoint.getV2_STATUS() + "/trackable";
8989
}

sdk/LoginRadius-JavaSDK/src/main/java/com/loginradius/sdk/advanced/api/LRAdvancedAPI.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
package com.loginradius.sdk.advanced.api;
22

3+
4+
/*
5+
*
6+
* Created by LoginRadius Development Team on 02/06/2017
7+
Copyright © 2017 LoginRadius Inc. All rights reserved.
8+
9+
*/
10+
311
import java.util.Map;
412

513
import com.google.gson.Gson;
14+
import com.google.gson.GsonBuilder;
615
import com.google.gson.JsonObject;
716
import com.loginradius.sdk.resource.LoginRadiusException;
817
import com.loginradius.sdk.util.LoginRadiusJsonDeserializer;
@@ -17,7 +26,7 @@
1726
*/
1827
public abstract class LRAdvancedAPI {
1928

20-
Gson gson = new Gson();
29+
Gson gson = new GsonBuilder().serializeNulls().create();
2130

2231
protected RestRequest restrequest = new RestRequest();
2332
protected LoginRadiusJsonDeserializer deserializer = new LoginRadiusJsonDeserializer();

0 commit comments

Comments
 (0)