Commit 87ef11e7 authored by Rucha Deshpande's avatar Rucha Deshpande
Browse files

update core -lib and add debug stsms

parent d34e4028
......@@ -155,6 +155,8 @@ public class PubsubEndpoint {
private String querySubscriptionAndUpdateCache(String notificationId) throws Exception {
Map<String,String> hmap = headers.getHeaders();
String auth_header = hmap.get("Authorization");
System.out.println("Notification token before creating subscription service= "+auth_header);
ISubscriptionService service = subscriptionFactory.create(headers);
......
......@@ -50,7 +50,7 @@
<dependency>
<groupId>org.opengroup.osdu.core.aws</groupId>
<artifactId>os-core-lib-aws</artifactId>
<version>0.3.14-feat-deshruch-oauth-changes-SNAPSHOT</version>
<version>0.3.14-oauth-feat-deshruch-oauth-changes-SNAPSHOT</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk-secretsmanager -->
......
......@@ -108,19 +108,14 @@ public class ServiceAccountJwtAwsClientImpl implements IServiceAccountJwtClient
Parameter paramsResult = paramResult.getParameter();
client_credentials_clientid = paramsResult.getValue();
client_credentials_secret = getSecret(client_secret_secretName,amazonRegion,client_secret_key);
String token= getServicePrincipalCredentials();
System.out.println(token);
}
}
@Override
public String getIdToken(String s) {
String token= getServicePrincipalCredentials();
System.out.println("Printing the client credentials token generated");
System.out.println(token);
return token;
}
public String getServicePrincipalCredentials()
......@@ -147,13 +142,13 @@ public class ServiceAccountJwtAwsClientImpl implements IServiceAccountJwtClient
{
System.out.println("Could not parse AccessToken result to get access_token");
}
return token;
return "Bearer "+token;
}
public String getSecret(String secretName, String region,String secretKey) {
String secretVaue="";
String secretVaue="";
// Create a Secrets Manager client
AWSSecretsManager client = AWSSecretsManagerClientBuilder.standard()
.withRegion(region)
......
......@@ -44,7 +44,7 @@
<dependency>
<groupId>org.opengroup.osdu.core.aws</groupId>
<artifactId>os-core-lib-aws</artifactId>
<version>0.3.14-feat-deshruch-oauth-changes-SNAPSHOT</version>
<version>0.3.14-oauth-feat-deshruch-oauth-changes-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment