Compare commits
2 Commits
c70331e6a6
...
c56f8ec9c2
Author | SHA1 | Date |
---|---|---|
Alfredo Oliviero | c56f8ec9c2 | |
Alfredo Oliviero | 910397f3d1 |
|
@ -1,10 +1,9 @@
|
|||
# Changelog
|
||||
|
||||
## [v1.3.0-SNAPSHOT] - 20240-03-22
|
||||
Token exchange (#27099)
|
||||
## [v1.3.0] = 2024-04-10
|
||||
Client-exchange configuration for a dedicated client (#27204)
|
||||
|
||||
## [v1.2.0] - 2023-03-20
|
||||
## [v1.2.0] - 2024-03-20
|
||||
|
||||
- Decode Button
|
||||
- Updatet layout
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
VERSION=1.3.0-SNAPSHOT
|
||||
VERSION=1.3.0
|
||||
mvn package
|
||||
scp target/rpt-token-portlet-$VERSION.war life@10.1.30.156:/home/life/Portal-Bundle/deploy/rpt-token-portlet.war
|
||||
|
|
4
pom.xml
4
pom.xml
|
@ -6,14 +6,14 @@
|
|||
<parent>
|
||||
<artifactId>maven-parent</artifactId>
|
||||
<groupId>org.gcube.tools</groupId>
|
||||
<version>1.1.0</version>
|
||||
<version>1.2.0</version>
|
||||
<relativePath />
|
||||
</parent>
|
||||
<groupId>org.gcube.portlets.admin</groupId>
|
||||
<artifactId>rpt-token-portlet</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<name>RPT UMA Token Portlet</name>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
<version>1.3.0</version>
|
||||
<description>
|
||||
Requesting Party Token Portlet
|
||||
</description>
|
||||
|
|
|
@ -44,7 +44,12 @@ public class OpenIdConnectRESTHelperExtended extends OpenIdConnectRESTHelper {
|
|||
String client_secret,
|
||||
List<String> permissions) throws OpenIdConnectRESTHelperException {
|
||||
|
||||
logger.info("Queried exchangeToken for context " + audience);
|
||||
// logger.info("Queried exchangeToken for context " + audience);
|
||||
|
||||
// logger.info("token url " + tokenUrl);
|
||||
// logger.info("exchangedToken credentials " + client_id + " " + client_secret) ;
|
||||
|
||||
|
||||
|
||||
Map<String, List<String>> params = new HashMap<>();
|
||||
Map<String, String> extraHeaders = new HashMap<>();
|
||||
|
|
|
@ -97,7 +97,6 @@ public class RPTTokenReader extends MVCPortlet {
|
|||
|
||||
GroupManager gm = new LiferayGroupManager();
|
||||
|
||||
|
||||
resourceResponse.setContentType("application/json");
|
||||
JSONObject jsonObject = JSONFactoryUtil.createJSONObject();
|
||||
|
||||
|
@ -121,19 +120,12 @@ public class RPTTokenReader extends MVCPortlet {
|
|||
// umaToken = OpenIdConnectRESTHelper.queryUMAToken(configuration.getTokenURL(),
|
||||
// authToken.getAccessTokenAsBearer(), urlEncodedContext, null);
|
||||
|
||||
// URL auth_url = configuration.getTokenURL();
|
||||
// log.info("auth_url " + auth_url);
|
||||
// log.info("authToken '" + authToken.getAccessTokenString() + "'");
|
||||
// log.info("umaToken " + umaToken.getAccessTokenString());
|
||||
// log.info("context " + context);
|
||||
// log.info("encoded_context " + urlEncodedContext);
|
||||
// log.info("client_id " + configuration.getPortalClientId());
|
||||
// log.info("client_secret " + configuration.getPortalClientSecret());
|
||||
|
||||
Long companyId = PortalUtil.getCompanyId(httpReq);
|
||||
|
||||
String exchangeClientId = PrefsPropsUtil.getString(companyId, "d4science.oidc-token-exchange-dedicated-client-id");
|
||||
String exchangeClientSecret = PrefsPropsUtil.getString(companyId, "d4science.oidc-token-exchange-dedicated-client-secret");
|
||||
String exchangeClientId = PrefsPropsUtil.getString(companyId,
|
||||
"d4science.oidc-token-exchange-dedicated-client-id");
|
||||
String exchangeClientSecret = PrefsPropsUtil.getString(companyId,
|
||||
"d4science.oidc-token-exchange-dedicated-client-secret");
|
||||
|
||||
exchangedToken = OpenIdConnectRESTHelperExtended.ExtendedQueryExchangeToken(
|
||||
configuration.getTokenURL(),
|
||||
|
@ -141,10 +133,7 @@ public class RPTTokenReader extends MVCPortlet {
|
|||
urlEncodedContext,
|
||||
exchangeClientId,
|
||||
exchangeClientSecret,
|
||||
null
|
||||
);
|
||||
|
||||
// log.info("exchangedToken " + exchangedToken.getAccessTokenString());
|
||||
null);
|
||||
|
||||
// log.debug("Got a new UMA token " + exchangedToken.getTokenEssentials());
|
||||
} catch (OpenIdConnectRESTHelperException e) {
|
||||
|
|
Loading…
Reference in New Issue