Compare commits

...

7 Commits

6 changed files with 79 additions and 40 deletions

View File

@ -4,6 +4,15 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v2.5.1]
- Added library to support Java 11 JDK
## [v2.5.0] - [2022-04-20]
- Deprecated AccessTokenProvider, AuthorizationProvider and SecurityTokenProvider [#22871]
- Added roles to ExternalService Client info
## [v2.4.0] - [2021-05-21]
JWTUmaTokenProvider changed to AccessTokenProvider

94
pom.xml
View File

@ -1,41 +1,59 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.gcube.common</groupId>
<artifactId>common-authorization</artifactId>
<version>2.4.0</version>
<name>authorization service common library</name>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>maven-parent</artifactId>
<groupId>org.gcube.tools</groupId>
<version>1.1.0</version>
</parent>
<parent>
<artifactId>maven-parent</artifactId>
<groupId>org.gcube.tools</groupId>
<version>1.1.0</version>
</parent>
<scm>
<connection>scm:git:https://code-repo.d4science.org/gCubeSystem/common-authorization.git</connection>
<developerConnection>scm:git:https://code-repo.d4science.org/gCubeSystem/common-authorization.git</developerConnection>
<url>https://code-repo.d4science.org/gCubeSystem/common-authorization</url>
</scm>
<groupId>org.gcube.common</groupId>
<artifactId>common-authorization</artifactId>
<version>2.5.1</version>
<name>authorization service common library</name>
<dependencies>
<dependency>
<groupId>org.gcube.core</groupId>
<artifactId>common-scope</artifactId>
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.5</version>
</dependency>
</dependencies>
<scm>
<connection>scm:git:https://code-repo.d4science.org/gCubeSystem/common-authorization.git</connection>
<developerConnection>scm:git:https://code-repo.d4science.org/gCubeSystem/common-authorization.git</developerConnection>
<url>https://code-repo.d4science.org/gCubeSystem/common-authorization</url>
</scm>
</project>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.gcube.distribution</groupId>
<artifactId>gcube-bom</artifactId>
<version>2.1.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.gcube.core</groupId>
<artifactId>common-scope</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<!-- Added to support Java 11 JDK -->
<dependency>
<groupId>javax.xml.ws</groupId>
<artifactId>jaxws-api</artifactId>
<scope>provided</scope>
</dependency>
<!-- END Added to support Java 11 JDK -->
</dependencies>
</project>

View File

@ -1,5 +1,6 @@
package org.gcube.common.authorization.library.provider;
@Deprecated
public class AccessTokenProvider {
public static AccessTokenProvider instance = new AccessTokenProvider();

View File

@ -2,6 +2,7 @@ package org.gcube.common.authorization.library.provider;
import org.gcube.common.authorization.library.utils.Caller;
@Deprecated
public class AuthorizationProvider {
public static AuthorizationProvider instance = new AuthorizationProvider();

View File

@ -22,10 +22,20 @@ public class ExternalServiceInfo extends ClientInfo{
private String generatedBy;
private List<String> roles;
public ExternalServiceInfo(String id, String generatedBy) {
super();
this.id = id;
this.generatedBy = generatedBy;
this.roles = Collections.emptyList();
}
public ExternalServiceInfo(String id, String generatedBy, List<String> roles) {
super();
this.id = id;
this.generatedBy = generatedBy;
this.roles = roles;
}
protected ExternalServiceInfo() {
@ -43,7 +53,7 @@ public class ExternalServiceInfo extends ClientInfo{
@Override
public List<String> getRoles() {
return Collections.emptyList();
return roles;
}
@Override

View File

@ -1,6 +1,6 @@
package org.gcube.common.authorization.library.provider;
@Deprecated
public class SecurityTokenProvider {
public static SecurityTokenProvider instance = new SecurityTokenProvider();