forked from gCubeSystem/gx-rest
Removed -SNAPSHOT for release
This commit is contained in:
parent
e9af3d2d23
commit
f4c942ddb6
|
@ -3,7 +3,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|||
# Changelog for gxREST
|
||||
|
||||
|
||||
## [v1.2.0-SNAPSHOT]
|
||||
## [v1.2.0]
|
||||
|
||||
- Managing new UMA token and not only old authz gcube token [#21525]
|
||||
- Switched JSON management to gcube-jackson [#19737]
|
||||
|
|
|
@ -119,12 +119,11 @@ public class GXConnection {
|
|||
public HttpURLConnection send(HTTPMETHOD method) throws Exception {
|
||||
return send(this.buildURL(), method);
|
||||
}
|
||||
|
||||
|
||||
private HttpURLConnection addGCubeAuthorizationToken(HttpURLConnection uConn) throws Exception {
|
||||
if (!this.extCall) {
|
||||
String oldGcubeAuthtoken = SecurityTokenProvider.instance.get();
|
||||
|
||||
if (Objects.isNull(oldGcubeAuthtoken) || oldGcubeAuthtoken.isEmpty()) {
|
||||
String oldGcubeAuthToken = SecurityTokenProvider.instance.get();
|
||||
if (Objects.isNull(oldGcubeAuthToken) || oldGcubeAuthToken.isEmpty()) {
|
||||
String umaToken = AccessTokenProvider.instance.get();
|
||||
if(Objects.isNull(umaToken) || umaToken.isEmpty()) {
|
||||
throw new IllegalStateException("The security token in the current environment is null.");
|
||||
|
@ -132,7 +131,7 @@ public class GXConnection {
|
|||
uConn.setRequestProperty("Authorization", "Bearer " + umaToken);
|
||||
}
|
||||
} else {
|
||||
uConn.setRequestProperty(org.gcube.common.authorization.client.Constants.TOKEN_HEADER_ENTRY, oldGcubeAuthtoken);
|
||||
uConn.setRequestProperty(org.gcube.common.authorization.client.Constants.TOKEN_HEADER_ENTRY, oldGcubeAuthToken);
|
||||
}
|
||||
}
|
||||
return uConn;
|
||||
|
@ -186,7 +185,7 @@ public class GXConnection {
|
|||
}
|
||||
return uConn;
|
||||
}
|
||||
|
||||
|
||||
private URL getURL(String urlString) throws MalformedURLException {
|
||||
URL url = new URL(urlString);
|
||||
if (url.getProtocol().equals("https")) {
|
||||
|
|
Loading…
Reference in New Issue