Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Open Subsurface Data Universe Software
Platform
System
Notification
Commits
4ad50766
Commit
4ad50766
authored
Nov 16, 2020
by
Rucha Deshpande
Browse files
oauth client credentials
parent
87ef11e7
Changes
4
Hide whitespace changes
Inline
Side-by-side
notification-core/src/main/java/org/opengroup/osdu/notification/api/PubsubEndpoint.java
View file @
4ad50766
...
...
@@ -155,7 +155,7 @@ public class PubsubEndpoint {
private
String
querySubscriptionAndUpdateCache
(
String
notificationId
)
throws
Exception
{
Map
<
String
,
String
>
hmap
=
headers
.
getHeaders
();
String
auth_header
=
hmap
.
get
(
"
A
uthorization"
);
String
auth_header
=
hmap
.
get
(
"
a
uthorization"
);
System
.
out
.
println
(
"Notification token before creating subscription service= "
+
auth_header
);
ISubscriptionService
service
=
subscriptionFactory
.
create
(
headers
);
...
...
provider/notification-aws/pom.xml
View file @
4ad50766
...
...
@@ -50,7 +50,7 @@
<dependency>
<groupId>
org.opengroup.osdu.core.aws
</groupId>
<artifactId>
os-core-lib-aws
</artifactId>
<version>
0.3.1
4-oauth-feat-deshruch-oauth-changes
-SNAPSHOT
</version>
<version>
0.3.1
2
-SNAPSHOT
</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk-secretsmanager -->
...
...
provider/notification-aws/src/main/java/org/opengroup/osdu/notification/provider/aws/impl/ServiceAccountJwtAwsClientImpl.java
View file @
4ad50766
...
...
@@ -129,6 +129,7 @@ public class ServiceAccountJwtAwsClientImpl implements IServiceAccountJwtClient
headers
.
put
(
"Content-Type"
,
"application/x-www-form-urlencoded"
);
IHttpClient
httpClient
=
new
HttpClient
();
String
url
=
tokenUrl
+
"?grant_type=client_credentials&client_id="
+
client_credentials_clientid
+
"&scope="
+
awsOauthCustomScope
;
System
.
out
.
println
(
"Token url="
+
url
);
HttpRequest
rq
=
HttpRequest
.
post
().
url
(
url
).
headers
(
headers
).
build
();
...
...
testing/notification-test-aws/pom.xml
View file @
4ad50766
...
...
@@ -44,7 +44,7 @@
<dependency>
<groupId>
org.opengroup.osdu.core.aws
</groupId>
<artifactId>
os-core-lib-aws
</artifactId>
<version>
0.3.1
4-oauth-feat-deshruch-oauth-changes
-SNAPSHOT
</version>
<version>
0.3.1
2
-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
com.amazonaws
</groupId>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment