porting to changes in common-security
This commit is contained in:
parent
a446c93589
commit
bd3cb5cc8f
|
@ -2,6 +2,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
||||||
|
|
||||||
# Changelog for Common Utility For Smartgears 4.X.X
|
# Changelog for Common Utility For Smartgears 4.X.X
|
||||||
|
|
||||||
|
## [v1.0.1-SNAPSHOT]
|
||||||
|
|
||||||
|
- porting to changes of common-security
|
||||||
|
|
||||||
## [v1.0.0-SNAPSHOT]
|
## [v1.0.0-SNAPSHOT]
|
||||||
|
|
||||||
- First Version
|
- First Version
|
||||||
|
|
6
pom.xml
6
pom.xml
|
@ -3,12 +3,12 @@
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>maven-parent</artifactId>
|
<artifactId>maven-parent</artifactId>
|
||||||
<groupId>org.gcube.tools</groupId>
|
<groupId>org.gcube.tools</groupId>
|
||||||
<version>1.1.0</version>
|
<version>1.2.0</version>
|
||||||
<relativePath />
|
<relativePath />
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.gcube.common</groupId>
|
<groupId>org.gcube.common</groupId>
|
||||||
<artifactId>common-utility-sg4</artifactId>
|
<artifactId>common-utility-sg4</artifactId>
|
||||||
<version>1.0.0-SNAPSHOT</version>
|
<version>1.0.1-SNAPSHOT</version>
|
||||||
<name>Common Utility For Smartgears 4.X.X</name>
|
<name>Common Utility For Smartgears 4.X.X</name>
|
||||||
<description>
|
<description>
|
||||||
This library provides utility functions for APIs available in Smartgears 3 but broken in Smartgears 4.
|
This library provides utility functions for APIs available in Smartgears 3 but broken in Smartgears 4.
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.distribution</groupId>
|
<groupId>org.gcube.distribution</groupId>
|
||||||
<artifactId>gcube-bom</artifactId>
|
<artifactId>gcube-bom</artifactId>
|
||||||
<version>3.0.0-SNAPSHOT</version>
|
<version>3.0.1-SNAPSHOT</version>
|
||||||
<type>pom</type>
|
<type>pom</type>
|
||||||
<scope>import</scope>
|
<scope>import</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
|
@ -8,7 +8,7 @@ import org.gcube.common.security.providers.SecretManagerProvider;
|
||||||
public class ContextUtility {
|
public class ContextUtility {
|
||||||
|
|
||||||
public static String getCurrentContextFullName() {
|
public static String getCurrentContextFullName() {
|
||||||
String context = SecretManagerProvider.instance.get().getContext();
|
String context = SecretManagerProvider.get().getContext();
|
||||||
return context;
|
return context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ public class GXHTTPUtility {
|
||||||
|
|
||||||
public static GXHTTPStringRequest getGXHTTPStringRequest(String address) {
|
public static GXHTTPStringRequest getGXHTTPStringRequest(String address) {
|
||||||
GXHTTPStringRequest gxHTTPStringRequest = GXHTTPStringRequest.newRequest(address);
|
GXHTTPStringRequest gxHTTPStringRequest = GXHTTPStringRequest.newRequest(address);
|
||||||
Secret secret = SecretManagerProvider.instance.get();
|
Secret secret = SecretManagerProvider.get();
|
||||||
Map<String, String> authorizationHeaders = secret.getHTTPAuthorizationHeaders();
|
Map<String, String> authorizationHeaders = secret.getHTTPAuthorizationHeaders();
|
||||||
for(String key : authorizationHeaders.keySet()) {
|
for(String key : authorizationHeaders.keySet()) {
|
||||||
gxHTTPStringRequest.header(key, authorizationHeaders.get(key));
|
gxHTTPStringRequest.header(key, authorizationHeaders.get(key));
|
||||||
|
|
Loading…
Reference in New Issue