File tree 4 files changed +34
-1
lines changed
src/java/main/com/cronos/onlinereview/util 4 files changed +34
-1
lines changed Original file line number Diff line number Diff line change 5311
5311
<Value >@aws_s3_bucket_dmz@</Value >
5312
5312
</Property >
5313
5313
</Property >
5314
+ <Property name =" new_auth" >
5315
+ <Property name =" new_auth_url" >
5316
+ <Value >@new_auth_url@</Value >
5317
+ </Property >
5318
+ </Property >
5314
5319
</Config >
5315
5320
5316
5321
<!--
Original file line number Diff line number Diff line change @@ -1070,6 +1070,11 @@ public class ConfigHelper {
1070
1070
* JWT default expiration time (1 day)
1071
1071
*/
1072
1072
private static final int DEFAULT_EXPIRATION_TIME = 60 * 24 ;
1073
+
1074
+ /**
1075
+ * New Auth URL for Iframe to refresh the RS256 token
1076
+ */
1077
+ private static String newAuthUrl ;
1073
1078
1074
1079
static {
1075
1080
// Obtaining the instance of Configuration Manager
@@ -1698,6 +1703,10 @@ public class ConfigHelper {
1698
1703
} catch (Exception e ) {
1699
1704
preSignedExpTimeMilis = 60 * 60 * 1000 ;
1700
1705
}
1706
+
1707
+ Property newAuth = cfgMgr .getPropertyObject (ONLINE_REVIEW_CFG_NS , "new_auth" );
1708
+ newAuthUrl = newAuth .getValue ("new_auth_url" );
1709
+
1701
1710
} catch (UnknownNamespaceException une ) {
1702
1711
System .out .println (une .getMessage ());
1703
1712
une .printStackTrace ();
@@ -2657,4 +2666,12 @@ public static String getS3BucketDmz() {
2657
2666
public static long getPreSignedExpTimeMilis () {
2658
2667
return preSignedExpTimeMilis ;
2659
2668
}
2669
+
2670
+ /**
2671
+ * Get new auth url
2672
+ * @return url
2673
+ */
2674
+ public static String getNewAuthUrl () {
2675
+ return newAuthUrl ;
2676
+ }
2660
2677
}
Original file line number Diff line number Diff line change @@ -50,3 +50,14 @@ analytics.identify('', {
50
50
});
51
51
</script >
52
52
53
+ <script >
54
+ function prepareFrame () {
55
+ var ifrm = document .createElement (" iframe" );
56
+ ifrm .setAttribute (" src" , " <%= com.cronos.onlinereview.util. ConfigHelper . getNewAuthUrl()% >" );
57
+ ifrm .style .width = " 0px" ;
58
+ ifrm .style .height = " 0px" ;
59
+ document .body .appendChild (ifrm);
60
+ }
61
+ window .onload = prepareFrame;
62
+ </script >
63
+
Original file line number Diff line number Diff line change 54
54
</script >
55
55
56
56
<a href =" javascript:;" class =" social-login" >Social login</a >
57
- | <a href =" http://<%= ApplicationServer . SERVER_NAME % > /login/?next =https://<%= ApplicationServer . SOFTWARE_SERVER_NAME% > /review" >Login</a >
57
+ | <a href =" http://<%= com.cronos.onlinereview.util . ConfigHelper . getNewAuthUrl() % > ?retUrl =https://<%= ApplicationServer . SOFTWARE_SERVER_NAME% > /review" >Login</a >
58
58
| <a href =" http://<%= ApplicationServer . SERVER_NAME% > /reg/" >Register</a >
59
59
| <a href =" http://<%= ApplicationServer . SERVER_NAME% > /" >Home</a >
60
60
</c:if >
You can’t perform that action at this time.
0 commit comments