Skip to content

Commit

Permalink
Scimono jakarta branch (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
hborisov authored Sep 14, 2023
1 parent f7c4c87 commit 329557e
Show file tree
Hide file tree
Showing 120 changed files with 366 additions and 364 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ mvn clean install
```java
import com.sap.scimono.SCIMApplication;

import javax.ws.rs.ApplicationPath;
import jakarta.ws.rs.ApplicationPath;

@ApplicationPath("scim")
public class MySCIMApi extends SCIMApplication {}
Expand Down Expand Up @@ -87,7 +87,7 @@ import com.sap.scimono.callback.schemas.SchemasCallback;
import com.sap.scimono.callback.users.UsersCallback;
import com.sap.scimono.callback.users.ResourceTypesCallback;

import javax.ws.rs.ApplicationPath;
import jakarta.ws.rs.ApplicationPath;

@ApplicationPath("scim")
public class MySCIMApi extends SCIMApplication {
Expand Down Expand Up @@ -122,7 +122,7 @@ The library also provides an extension point for custom resources. Example snipp
```java
import com.sap.scimono.SCIMApplication;

import javax.ws.rs.ApplicationPath;
import jakarta.ws.rs.ApplicationPath;
import java.util.Set;

@ApplicationPath("scim")
Expand Down
12 changes: 6 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<antlr4.version>4.10.1</antlr4.version>
<slf4j.version>1.7.36</slf4j.version>
<jackson.version>2.13.4.20221013</jackson.version>
<jersey.version>2.35</jersey.version>
<jersey.version>3.1.1</jersey.version>

<org.mockito.version>4.6.1</org.mockito.version>
<wiremock.version>2.32.0</wiremock.version>
Expand Down Expand Up @@ -93,12 +93,12 @@
<dependency>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
<version>2.1.6</version>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
<version>2.0.2</version>
<version>3.0.2</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson</groupId>
Expand All @@ -115,9 +115,9 @@
<type>pom</type>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>6.0.0</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.sap.scimono.client;

import javax.ws.rs.core.Response;
import jakarta.ws.rs.core.Response;
import java.util.Collection;

public class ActionResponseStatusConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
import java.util.Map;
import java.util.UUID;

import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.GenericType;
import javax.ws.rs.core.Response;
import jakarta.ws.rs.client.WebTarget;
import jakarta.ws.rs.core.GenericType;
import jakarta.ws.rs.core.Response;

import com.sap.scimono.api.API;
import com.sap.scimono.entity.Group;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import static com.fasterxml.jackson.annotation.JsonProperty.Access.READ_WRITE;
import static com.sap.scimono.api.API.APPLICATION_JSON_SCIM;

import javax.ws.rs.Consumes;
import javax.ws.rs.Produces;
import javax.ws.rs.ext.ContextResolver;
import jakarta.ws.rs.Consumes;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.ext.ContextResolver;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.ObjectMapper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import static com.sap.scimono.api.API.GROUPS;
import static com.sap.scimono.client.query.ResourcePageQuery.indexPageQuery;

import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.GenericType;
import javax.ws.rs.core.Response;
import jakarta.ws.rs.client.WebTarget;
import jakarta.ws.rs.core.GenericType;
import jakarta.ws.rs.core.Response;

import com.sap.scimono.client.query.IdentityPageQuery;
import com.sap.scimono.client.query.IndexPageQuery;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import java.util.Set;
import java.util.function.Function;

import javax.ws.rs.client.WebTarget;
import jakarta.ws.rs.client.WebTarget;

import com.sap.scimono.client.query.SCIMQuery;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.sap.scimono.client;

import javax.ws.rs.client.WebTarget;
import jakarta.ws.rs.client.WebTarget;

import com.sap.scimono.client.query.FilterQuery;
import com.sap.scimono.client.query.SCIMQuery;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import com.sap.scimono.entity.paging.PagedByIndexSearchResult;
import com.sap.scimono.entity.schema.ResourceType;

import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.GenericType;
import jakarta.ws.rs.client.WebTarget;
import jakarta.ws.rs.core.GenericType;

import static com.sap.scimono.api.API.RESOURCE_TYPES;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
import java.util.ListIterator;
import java.util.Map;

import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.UriBuilder;
import javax.ws.rs.ext.ContextResolver;
import jakarta.ws.rs.client.Client;
import jakarta.ws.rs.client.ClientBuilder;
import jakarta.ws.rs.client.WebTarget;
import jakarta.ws.rs.core.UriBuilder;
import jakarta.ws.rs.ext.ContextResolver;

import com.sap.scimono.client.authentication.OauthClientCredentialsAuthenticator;
import com.sap.scimono.client.authentication.TargetSystemAuthenticator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
import static com.sap.scimono.client.ResourceAction.PATCH_UPDATE;
import static com.sap.scimono.client.ResourceAction.PUT_UPDATE;
import static java.util.Collections.singleton;
import static javax.ws.rs.HttpMethod.PATCH;
import static javax.ws.rs.client.Entity.entity;
import static javax.ws.rs.core.HttpHeaders.CONTENT_TYPE;
import static javax.ws.rs.core.Response.Status.CREATED;
import static javax.ws.rs.core.Response.Status.NO_CONTENT;
import static javax.ws.rs.core.Response.Status.OK;
import static jakarta.ws.rs.HttpMethod.PATCH;
import static jakarta.ws.rs.client.Entity.entity;
import static jakarta.ws.rs.core.HttpHeaders.CONTENT_TYPE;
import static jakarta.ws.rs.core.Response.Status.CREATED;
import static jakarta.ws.rs.core.Response.Status.NO_CONTENT;
import static jakarta.ws.rs.core.Response.Status.OK;

import java.util.ArrayList;
import java.util.Arrays;
Expand All @@ -24,11 +24,11 @@
import java.util.List;
import java.util.Map;

import javax.ws.rs.client.Invocation;
import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.MultivaluedHashMap;
import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.core.Response;
import jakarta.ws.rs.client.Invocation;
import jakarta.ws.rs.client.WebTarget;
import jakarta.ws.rs.core.MultivaluedHashMap;
import jakarta.ws.rs.core.MultivaluedMap;
import jakarta.ws.rs.core.Response;

public class SCIMRequest {
private final MultivaluedMap<String, Object> httpHeaders;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
import java.util.LinkedList;
import java.util.List;

import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.GenericType;
import javax.ws.rs.core.Response;
import jakarta.ws.rs.client.WebTarget;
import jakarta.ws.rs.core.GenericType;
import jakarta.ws.rs.core.Response;

import com.sap.scimono.client.query.SCIMQuery;
import com.sap.scimono.entity.Resource;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.sap.scimono.client;

import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.GenericType;
import javax.ws.rs.core.Response;
import jakarta.ws.rs.WebApplicationException;
import jakarta.ws.rs.core.GenericType;
import jakarta.ws.rs.core.Response;

public class SCIMResponse<T> {
private final ResponseEntityReader<T> responseEntityReader;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import com.sap.scimono.entity.paging.PagedByIndexSearchResult;
import com.sap.scimono.entity.schema.Schema;

import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.GenericType;
import jakarta.ws.rs.client.WebTarget;
import jakarta.ws.rs.core.GenericType;

import static com.sap.scimono.api.API.SCHEMAS;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import com.sap.scimono.entity.config.ServiceProviderConfig;

import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.Response;
import jakarta.ws.rs.client.WebTarget;
import jakarta.ws.rs.core.Response;

import static com.sap.scimono.api.API.SERVICE_PROVIDER_CONFIG;
import static com.sap.scimono.client.ResourceAction.GET_SINGLE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import static com.sap.scimono.api.API.USERS;
import static com.sap.scimono.client.query.ResourcePageQuery.indexPageQuery;

import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.GenericType;
import jakarta.ws.rs.client.WebTarget;
import jakarta.ws.rs.core.GenericType;

import com.sap.scimono.client.query.IdentityPageQuery;
import com.sap.scimono.client.query.IndexPageQuery;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.sap.scimono.client.authentication;

import javax.ws.rs.client.Client;
import javax.ws.rs.core.UriBuilder;
import jakarta.ws.rs.client.Client;
import jakarta.ws.rs.core.UriBuilder;

public class OauthAuthenticatorFactory {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package com.sap.scimono.client.authentication;

import static javax.ws.rs.core.HttpHeaders.AUTHORIZATION;
import static jakarta.ws.rs.core.HttpHeaders.AUTHORIZATION;

import java.io.IOException;
import java.net.URI;
import java.time.Instant;

import javax.ws.rs.client.Client;
import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.Response;
import jakarta.ws.rs.client.Client;
import jakarta.ws.rs.client.WebTarget;
import jakarta.ws.rs.core.Response;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.sap.scimono.api.helper.ObjectMapperFactory;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.sap.scimono.client.authentication;

import javax.ws.rs.client.Client;
import javax.ws.rs.client.WebTarget;
import jakarta.ws.rs.client.Client;
import jakarta.ws.rs.client.WebTarget;
import java.net.URI;

public class OauthDeviceIdAuthenticator implements TargetSystemAuthenticator {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.sap.scimono.client.authentication;

import javax.ws.rs.client.ClientRequestContext;
import javax.ws.rs.client.ClientRequestFilter;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MultivaluedMap;
import jakarta.ws.rs.client.ClientRequestContext;
import jakarta.ws.rs.client.ClientRequestFilter;
import jakarta.ws.rs.core.HttpHeaders;
import jakarta.ws.rs.core.MultivaluedMap;

public interface TargetSystemAuthenticator extends ClientRequestFilter {
String OAUTH_GRANT_TYPE = "grant_type";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import com.sap.scimono.SCIMFilterBaseVisitor;
import com.sap.scimono.filter.QueryFilterParser;

import javax.ws.rs.client.WebTarget;
import jakarta.ws.rs.client.WebTarget;

public class FilterQuery implements SCIMQuery {
private static final String FILTER_QUERY_PARAM = "filter";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.sap.scimono.client.query;

import javax.ws.rs.client.WebTarget;
import jakarta.ws.rs.client.WebTarget;

import static com.sap.scimono.api.API.COUNT_PARAM;
import static com.sap.scimono.api.API.START_ID_PARAM;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.sap.scimono.client.query;

import javax.ws.rs.client.WebTarget;
import jakarta.ws.rs.client.WebTarget;

import static com.sap.scimono.api.API.COUNT_PARAM;
import static com.sap.scimono.api.API.START_INDEX_PARAM;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import java.util.LinkedHashMap;
import java.util.Map;

import javax.ws.rs.client.WebTarget;
import jakarta.ws.rs.client.WebTarget;

public class ResourcePageQuery implements SCIMQuery {
public static final int DEFAULT_COUNT = 100;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.sap.scimono.client.query;

import javax.ws.rs.client.WebTarget;
import jakarta.ws.rs.client.WebTarget;

public interface SCIMQuery {
WebTarget apply(WebTarget target);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import org.junit.jupiter.params.provider.CsvSource;
import org.junit.jupiter.params.provider.EnumSource;

import javax.ws.rs.core.Response;
import jakarta.ws.rs.core.Response;
import java.util.AbstractMap;
import java.util.Arrays;
import java.util.Collection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import java.util.UUID;

import javax.ws.rs.core.Response;
import jakarta.ws.rs.core.Response;

import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import org.junit.jupiter.api.TestFactory;
import org.junit.jupiter.api.function.Executable;

import javax.ws.rs.core.Response;
import jakarta.ws.rs.core.Response;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
Expand All @@ -42,9 +42,9 @@
import static com.sap.scimono.client.util.ResponseBodyAttributeExistenceAssertions.getPagedByIdentityResponseAssertions;
import static com.sap.scimono.client.util.ResponseBodyAttributeExistenceAssertions.getPagedByIndexResponseAssertions;
import static java.util.UUID.randomUUID;
import static javax.ws.rs.core.HttpHeaders.CONTENT_TYPE;
import static javax.ws.rs.core.Response.Status.CREATED;
import static javax.ws.rs.core.Response.Status.OK;
import static jakarta.ws.rs.core.HttpHeaders.CONTENT_TYPE;
import static jakarta.ws.rs.core.Response.Status.CREATED;
import static jakarta.ws.rs.core.Response.Status.OK;
import static org.glassfish.jersey.client.HttpUrlConnectorProvider.SET_METHOD_WORKAROUND;
import static org.junit.jupiter.api.Assertions.assertAll;
import static org.junit.jupiter.api.Assertions.assertFalse;
Expand Down
Loading

0 comments on commit 329557e

Please sign in to comment.