Removed -SNAPSHOT for release

This commit is contained in:
Luca Frosini 2021-06-23 12:57:36 +02:00
parent e9af3d2d23
commit f4c942ddb6
3 changed files with 7 additions and 8 deletions

View File

@ -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]

View File

@ -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")) {

View File

@ -10,7 +10,7 @@
<groupId>org.gcube.common</groupId>
<artifactId>gxREST</artifactId>
<version>1.2.0-SNAPSHOT</version>
<version>1.2.0</version>
<packaging>pom</packaging>
<name>gCube eXtensions to REST</name>
<description>gCube eXtensions to REST</description>