diff --git a/CHANGELOG.md b/CHANGELOG.md index fad0262..6627441 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,9 @@ +This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + # Changelog for "oidc-library-portal" +## [v1.0.1-SNAPSHOT] +- Added configuration for avatar URL (#19726) + ## [v1.0.0-SNAPSHOT] - First release (#19143) (#19225) (#19226) (#19227) (#19228) - - -This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). \ No newline at end of file diff --git a/pom.xml b/pom.xml index 006277d..a367209 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ org.gcube.portal oidc-library-portal - 1.0.0-SNAPSHOT + 1.1.0-SNAPSHOT diff --git a/profile.xml b/profile.xml deleted file mode 100644 index 0fe7047..0000000 --- a/profile.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - Portlet - - ${project.description} - PortletUser - ${project.artifactId} - 1.0.0 - - - ${project.artifactId} - ${project.description} - - ${project.groupId} - ${project.artifactId} - ${project.version} - - - ${project.build.finalName}.${project.packaging} - - - - - diff --git a/service_archive.xml b/service_archive.xml deleted file mode 100644 index 7fb882c..0000000 --- a/service_archive.xml +++ /dev/null @@ -1,18 +0,0 @@ - - org.apache.maven.plugins - maven-assembly-plugin - - - descriptor.xml - - - - - servicearchive - install - - single - - - - \ No newline at end of file diff --git a/src/main/java/org/gcube/portal/oidc/lr62/LiferayOpenIdConnectConfiguration.java b/src/main/java/org/gcube/portal/oidc/lr62/LiferayOpenIdConnectConfiguration.java index 59eace4..df8ccd3 100644 --- a/src/main/java/org/gcube/portal/oidc/lr62/LiferayOpenIdConnectConfiguration.java +++ b/src/main/java/org/gcube/portal/oidc/lr62/LiferayOpenIdConnectConfiguration.java @@ -29,6 +29,7 @@ public class LiferayOpenIdConnectConfiguration implements OpenIdConnectConfigura private URL tokenURL; private URL logoutURL; private URL issuerURL; + private URL avatarURL; private String portalClientId; private String portalClientSecret; private String scope; @@ -61,6 +62,7 @@ public class LiferayOpenIdConnectConfiguration implements OpenIdConnectConfigura this.tokenURL = new URL(PrefsPropsUtil.getString(companyId, "d4science.oidc-token")); this.logoutURL = new URL(PrefsPropsUtil.getString(companyId, "d4science.oidc-logout")); this.issuerURL = new URL(PrefsPropsUtil.getString(companyId, "d4science.oidc-issuer")); + this.avatarURL = new URL(PrefsPropsUtil.getString(companyId, "d4science.oidc-keycloak_avatar")); this.portalClientId = PrefsPropsUtil.getString(companyId, "d4science.oidc-portal-client-id"); this.portalClientSecret = PrefsPropsUtil.getString(companyId, "d4science.oidc-portal-client-secret"); this.scope = PrefsPropsUtil.getString(companyId, "d4science.oidc-scope"); @@ -73,6 +75,7 @@ public class LiferayOpenIdConnectConfiguration implements OpenIdConnectConfigura log.info("tokenURL=" + getTokenURL()); log.info("logoutURL=" + getLogoutURL()); log.info("issuerURL=" + getIssuerURL()); + log.info("avatarURL=" + getAvatarURL()); log.info("portalClientId=" + getPortalClientId()); log.info("portalClientSecret=" + getPortalClientSecret()); log.info("scope=" + getScope()); @@ -126,4 +129,9 @@ public class LiferayOpenIdConnectConfiguration implements OpenIdConnectConfigura return this.createUnexistingUser; } + @Override + public URL getAvatarURL() { + return avatarURL; + } + } diff --git a/src/main/java/org/gcube/portal/oidc/lr62/OIDCUmaUtil.java b/src/main/java/org/gcube/portal/oidc/lr62/OIDCUmaUtil.java index b83d20b..4d5c672 100644 --- a/src/main/java/org/gcube/portal/oidc/lr62/OIDCUmaUtil.java +++ b/src/main/java/org/gcube/portal/oidc/lr62/OIDCUmaUtil.java @@ -29,7 +29,7 @@ public class OIDCUmaUtil { try { log.debug("Getting client token from server"); JWTToken clientToken = OpenIdConnectRESTHelper.queryClientToken(clientId, clientSecret, tokenURL); - provideClientUMATokenInThreadLocal(clientToken.getAsBearer(), tokenURL, infraContext); + provideClientUMATokenInThreadLocal(clientToken.getAccessTokenAsBearer(), tokenURL, infraContext); } catch (Exception e) { log.error("Cannot retrieve client OIDC token", e); return;