(nifi) branch support/nifi-1.x updated: NIFI-13379 Replaced use of deprecated com.nimbusds.oauth2.sdk.http.HTTPResponse method getContentAsJSONObject with API suggested replacement getBodyAsJSONObject

2024-06-13 Thread mthomsen
This is an automated email from the ASF dual-hosted git repository.

mthomsen pushed a commit to branch support/nifi-1.x
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/support/nifi-1.x by this push:
 new 627fa06866 NIFI-13379 Replaced use of deprecated 
com.nimbusds.oauth2.sdk.http.HTTPResponse method getContentAsJSONObject with 
API suggested replacement getBodyAsJSONObject.
627fa06866 is described below

commit 627fa06866e7f8bca8e2504a8e4027ee6568392d
Author: dan-s1 
AuthorDate: Mon Jun 10 15:56:32 2024 +

NIFI-13379 Replaced use of deprecated 
com.nimbusds.oauth2.sdk.http.HTTPResponse method getContentAsJSONObject with 
API suggested replacement getBodyAsJSONObject.

This closes #8944

Signed-off-by: Mike Thomsen 
---
 .../web/security/authentication/oidc/StandardOidcIdentityProvider.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/nifi-registry/nifi-registry-core/nifi-registry-web-api/src/main/java/org/apache/nifi/registry/web/security/authentication/oidc/StandardOidcIdentityProvider.java
 
b/nifi-registry/nifi-registry-core/nifi-registry-web-api/src/main/java/org/apache/nifi/registry/web/security/authentication/oidc/StandardOidcIdentityProvider.java
index e70f696604..e83cba3daf 100644
--- 
a/nifi-registry/nifi-registry-core/nifi-registry-web-api/src/main/java/org/apache/nifi/registry/web/security/authentication/oidc/StandardOidcIdentityProvider.java
+++ 
b/nifi-registry/nifi-registry-core/nifi-registry-web-api/src/main/java/org/apache/nifi/registry/web/security/authentication/oidc/StandardOidcIdentityProvider.java
@@ -255,7 +255,7 @@ public class StandardOidcIdentityProvider implements 
OidcIdentityProvider {
 throw new IOException("Unable to download OpenId Connect Provider 
metadata from " + url + ": Status code " + httpResponse.getStatusCode());
 }
 
-final JSONObject jsonObject = httpResponse.getContentAsJSONObject();
+final JSONObject jsonObject = httpResponse.getBodyAsJSONObject();
 return OIDCProviderMetadata.parse(jsonObject);
 }
 



(nifi) branch main updated: NIFI-13379 Replaced use of deprecated com.nimbusds.oauth2.sdk.http.HTTPResponse method getContentAsJSONObject with API suggested replacement getBodyAsJSONObject.

2024-06-13 Thread mthomsen
This is an automated email from the ASF dual-hosted git repository.

mthomsen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/main by this push:
 new a8e8b6a86b NIFI-13379 Replaced use of deprecated 
com.nimbusds.oauth2.sdk.http.HTTPResponse method getContentAsJSONObject with 
API suggested replacement getBodyAsJSONObject.
a8e8b6a86b is described below

commit a8e8b6a86b5293858423fa068db65dc8b0d44975
Author: dan-s1 
AuthorDate: Mon Jun 10 15:56:32 2024 +

NIFI-13379 Replaced use of deprecated 
com.nimbusds.oauth2.sdk.http.HTTPResponse method getContentAsJSONObject with 
API suggested replacement getBodyAsJSONObject.

This closes #8944

Signed-off-by: Mike Thomsen 
---
 .../web/security/authentication/oidc/StandardOidcIdentityProvider.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/nifi-registry/nifi-registry-core/nifi-registry-web-api/src/main/java/org/apache/nifi/registry/web/security/authentication/oidc/StandardOidcIdentityProvider.java
 
b/nifi-registry/nifi-registry-core/nifi-registry-web-api/src/main/java/org/apache/nifi/registry/web/security/authentication/oidc/StandardOidcIdentityProvider.java
index 1726f23b37..8adeb00ae5 100644
--- 
a/nifi-registry/nifi-registry-core/nifi-registry-web-api/src/main/java/org/apache/nifi/registry/web/security/authentication/oidc/StandardOidcIdentityProvider.java
+++ 
b/nifi-registry/nifi-registry-core/nifi-registry-web-api/src/main/java/org/apache/nifi/registry/web/security/authentication/oidc/StandardOidcIdentityProvider.java
@@ -255,7 +255,7 @@ public class StandardOidcIdentityProvider implements 
OidcIdentityProvider {
 throw new IOException("Unable to download OpenId Connect Provider 
metadata from " + url + ": Status code " + httpResponse.getStatusCode());
 }
 
-final JSONObject jsonObject = httpResponse.getContentAsJSONObject();
+final JSONObject jsonObject = httpResponse.getBodyAsJSONObject();
 return OIDCProviderMetadata.parse(jsonObject);
 }