[DEV] set SSO optionnal. (no security mode)
Some checks are pending
WEB karideo and rabbit/archidata/pipeline/head Build queued...
Some checks are pending
WEB karideo and rabbit/archidata/pipeline/head Build queued...
This commit is contained in:
parent
a07c134d0f
commit
12231762d3
2
pom.xml
2
pom.xml
@ -2,7 +2,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>kangaroo-and-rabbit</groupId>
|
<groupId>kangaroo-and-rabbit</groupId>
|
||||||
<artifactId>archidata</artifactId>
|
<artifactId>archidata</artifactId>
|
||||||
<version>0.3.3</version>
|
<version>0.3.4</version>
|
||||||
<properties>
|
<properties>
|
||||||
<jersey.version>3.1.1</jersey.version>
|
<jersey.version>3.1.1</jersey.version>
|
||||||
<jaxb.version>2.3.1</jaxb.version>
|
<jaxb.version>2.3.1</jaxb.version>
|
||||||
|
@ -756,7 +756,7 @@ public class SqlWrapper {
|
|||||||
query.append(".deleted = false ");
|
query.append(".deleted = false ");
|
||||||
*/
|
*/
|
||||||
firstField = true;
|
firstField = true;
|
||||||
System.out.println("generate the query: '" + query.toString() + "'");
|
//System.out.println("generate the query: '" + query.toString() + "'");
|
||||||
// prepare the request:
|
// prepare the request:
|
||||||
PreparedStatement ps = entry.connection.prepareStatement(query.toString(), Statement.RETURN_GENERATED_KEYS);
|
PreparedStatement ps = entry.connection.prepareStatement(query.toString(), Statement.RETURN_GENERATED_KEYS);
|
||||||
whereInjectValue(ps, condition);
|
whereInjectValue(ps, condition);
|
||||||
|
@ -6,8 +6,13 @@ import org.kar.archidata.util.JWTWrapper;
|
|||||||
public class UpdateJwtPublicKey extends Thread {
|
public class UpdateJwtPublicKey extends Thread {
|
||||||
boolean kill = false;
|
boolean kill = false;
|
||||||
public void run() {
|
public void run() {
|
||||||
|
if (ConfigBaseVariable.getSSOAddress() == null) {
|
||||||
|
System.out.println("SSO INTERFACE is not provided ==> work alone.");
|
||||||
|
// No SO provided, kill the thread.
|
||||||
|
return;
|
||||||
|
}
|
||||||
while (this.kill == false) {
|
while (this.kill == false) {
|
||||||
// need to uppgrade when server call us...
|
// need to upgrade when server call us...
|
||||||
try {
|
try {
|
||||||
JWTWrapper.initLocalTokenRemote(ConfigBaseVariable.getSSOAddress(), "archidata");
|
JWTWrapper.initLocalTokenRemote(ConfigBaseVariable.getSSOAddress(), "archidata");
|
||||||
} catch (Exception e1) {
|
} catch (Exception e1) {
|
||||||
@ -16,6 +21,7 @@ public class UpdateJwtPublicKey extends Thread {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
// update every 5 minutes the master token
|
||||||
Thread.sleep(1000*60*5, 0);
|
Thread.sleep(1000*60*5, 0);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -77,10 +77,6 @@ public class ConfigBaseVariable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static String getSSOAddress() {
|
public static String getSSOAddress() {
|
||||||
if (ssoAdress == null) {
|
|
||||||
//return "http://sso_host/api/";
|
|
||||||
return "http://192.168.1.156/karso/api/";
|
|
||||||
}
|
|
||||||
return ssoAdress;
|
return ssoAdress;
|
||||||
}
|
}
|
||||||
public static String ssoToken() {
|
public static String ssoToken() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user