Skip to content

Commit

Permalink
Have a single module with synced classes from keycloak/keycloak Clo…
Browse files Browse the repository at this point in the history
…ses #keycloak-client-34

Signed-off-by: Peter Skopek <[email protected]>
  • Loading branch information
pskopek authored and mposolda committed Sep 12, 2024
1 parent f789270 commit 4c892a2
Show file tree
Hide file tree
Showing 459 changed files with 495 additions and 18,548 deletions.
1 change: 1 addition & 0 deletions .github/scripts/sync-keycloak-sources.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@ if [[ ! $PWD == *keycloak-client ]]; then
error "The script is supposed to be executed in the root of 'keycloak-client' repository";
fi;

syncFiles client-common-synced
syncFiles admin-client
syncFiles authz-client
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@ Keycloak-client java modules

The files in the modules:

* [client-common-synced](client-common-synced)
* [admin-client](admin-client)
* [authz-client](authz-client)

are not "owned" by this repository and hence the Java files should ideally not be directly updated. Those files are "owned" by the [main Keycloak server repository](https://github.com/keycloak/keycloak)
and hence are supposed to be updated there (whenever needed) and synced into this repository by the bash script [sync-keycloak-sources.sh](.github/scripts/sync-keycloak-sources.sh)

> [!NOTE]
> **client-common-synced** module will be synced from Keycloak Main repository for the future and is a dependency of rest of the modules in this repository. Modules **admin-client** and **authz-client** may move to this repository in the future, therefore they are separated.
## Syncing the files from Keycloak repository

* Checkout [main Keycloak server repository](https://github.com/keycloak/keycloak) and build it on your laptop to make sure latest Keycloak stuff available in your local maven repository.
Expand Down
73 changes: 7 additions & 66 deletions admin-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
<description/>

<dependencies>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-client-common-synced</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
Expand Down Expand Up @@ -99,73 +103,10 @@
<classifier>sources</classifier>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/unpacked</outputDirectory>
<includes>**/*</includes>
<excludes>META-INF/**/*</excludes>
</artifactItem>
<artifactItem>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-core</artifactId>
<version>${keycloak.version}</version>
<type>jar</type>
<classifier>sources</classifier>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/unpacked</outputDirectory>
<includes>
org/keycloak/OAuth2Constants.java,
org/keycloak/TokenCategory.java,
org/keycloak/Token.java,
org/keycloak/TokenIdGenerator.java,
org/keycloak/crypto/KeyUse.java,
org/keycloak/crypto/Algorithm.java,
org/keycloak/json/*.java,
org/keycloak/representations/adapters/action/GlobalRequestResult.java,
org/keycloak/representations/idm/**/*.java,
org/keycloak/representations/info/*.java,
org/keycloak/representations/userprofile/config/*.java,
org/keycloak/representations/AccessToken.java,
org/keycloak/representations/AccessTokenResponse.java,
org/keycloak/representations/AddressClaimSet.java,
org/keycloak/representations/IDToken.java,
org/keycloak/representations/JsonWebToken.java,
org/keycloak/representations/KeyStoreConfig.java,
org/keycloak/util/BasicAuthHelper.java,
org/keycloak/util/EnumWithStableIndex.java,
org/keycloak/util/JsonSerialization.java,
org/keycloak/util/SystemPropertiesJsonParserFactory.java,
</includes>
</artifactItem>
<artifactItem>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-common</artifactId>
<version>${keycloak.version}</version>
<type>jar</type>
<classifier>sources</classifier>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/unpacked</outputDirectory>
<includes>
org/keycloak/common/util/Base64.java,
org/keycloak/common/util/CollectionUtil.java,
org/keycloak/common/util/MultivaluedHashMap.java,
org/keycloak/common/util/MultivaluedMap.java,
org/keycloak/common/util/ObjectUtil.java,
org/keycloak/common/util/StringPropertyReplacer.java,
org/keycloak/common/util/SystemEnvProperties.java,
org/keycloak/common/util/Time.java,
org/keycloak/common/crypto/CryptoConstants.java,
org/keycloak/common/constants/ServiceAccountConstants.java,
</includes>
</artifactItem>
<artifactItem>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-server-spi</artifactId>
<version>${keycloak.version}</version>
<type>jar</type>
<classifier>sources</classifier>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/unpacked</outputDirectory>
<includes>
org/keycloak/utils/StringUtil.java,
</includes>
org/**/*,
META-INF/services/*
</includes> <!-- unpack just source code and potential services -->
</artifactItem>
</artifactItems>
<overWriteReleases>false</overWriteReleases>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
import jakarta.ws.rs.PUT;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.MediaType;

import org.jboss.resteasy.annotations.cache.NoCache;
import org.keycloak.representations.idm.ClientTypesRepresentation;

/**
Expand All @@ -33,7 +31,6 @@
public interface ClientTypesResource {

@GET
@NoCache
@Produces(MediaType.APPLICATION_JSON)
ClientTypesRepresentation getClientTypes();

Expand Down
98 changes: 7 additions & 91 deletions authz-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@
<name>Keycloak Authz: Client API</name>
<description>KeyCloak AuthZ: Client API</description>

<properties>
<!-- We still need to support EAP 8, set the Java version to 11. -->
<maven.compiler.release>11</maven.compiler.release>
</properties>

<dependencies>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-client-common-synced</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
Expand Down Expand Up @@ -100,93 +99,10 @@
<classifier>sources</classifier>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/unpacked</outputDirectory>
<includes>**/*</includes>
<excludes>META-INF/**/*</excludes>
</artifactItem>
<artifactItem>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-core</artifactId>
<version>${keycloak.version}</version>
<type>jar</type>
<classifier>sources</classifier>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/unpacked</outputDirectory>
<includes>
org/keycloak/OAuth2Constants.java,
org/keycloak/TokenCategory.java,
org/keycloak/Token.java,
org/keycloak/TokenIdGenerator.java,
org/keycloak/crypto/KeyUse.java,
org/keycloak/json/*.java,
org/keycloak/representations/adapters/action/GlobalRequestResult.java,
org/keycloak/representations/idm/**/*.java,
org/keycloak/representations/info/*.java,
org/keycloak/representations/userprofile/config/*.java,
org/keycloak/representations/AccessToken.java,
org/keycloak/representations/AccessTokenResponse.java,
org/keycloak/representations/AddressClaimSet.java,
org/keycloak/representations/IDToken.java,
org/keycloak/representations/JsonWebToken.java,
org/keycloak/representations/KeyStoreConfig.java,
org/keycloak/util/BasicAuthHelper.java,
org/keycloak/util/EnumWithStableIndex.java,
org/keycloak/util/JsonSerialization.java,
org/keycloak/util/SystemPropertiesJsonParserFactory.java,

org/keycloak/jose/JOSE.java,
org/keycloak/jose/JOSEHeader.java,
org/keycloak/jose/jwe/**/*.java,
org/keycloak/jose/jws/**/*.java,
org/keycloak/jose/jwk/**/*.java,
org/keycloak/crypto/**/*.java,

org/keycloak/representations/adapters/config/*.java,
org/keycloak/representations/RefreshToken.java,
org/keycloak/protocol/oidc/client/authentication/*.java,
org/keycloak/util/TokenUtil.java,
org/keycloak/AuthorizationContext.java,
org/keycloak/constants/ServiceUrlConstants.java,

</includes>
</artifactItem>
<artifactItem>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-core</artifactId>
<version>${keycloak.version}</version>
<type>jar</type>
<classifier>sources</classifier>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/unpacked-resources</outputDirectory>
<includes>
META-INF/services/**/*
</includes>
</artifactItem>
<artifactItem>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-common</artifactId>
<version>${keycloak.version}</version>
<type>jar</type>
<classifier>sources</classifier>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/unpacked</outputDirectory>
<includes>
org/keycloak/common/**/*.java,

org/keycloak/common/util/Base64.java,
org/keycloak/common/util/CollectionUtil.java,
org/keycloak/common/util/MultivaluedHashMap.java,
org/keycloak/common/util/MultivaluedMap.java,
org/keycloak/common/util/ObjectUtil.java,
org/keycloak/common/util/StringPropertyReplacer.java,
org/keycloak/common/util/SystemEnvProperties.java,
org/keycloak/common/util/Time.java,

org/keycloak/common/util/Encode.java,
org/keycloak/common/util/Base64Url.java,
org/keycloak/common/util/PemUtils.java,
org/keycloak/common/util/MimeTypeUtil.java,

</includes>
org/**/*,
META-INF/services/*
</includes> <!-- unpack just source code and potential services -->
</artifactItem>
</artifactItems>
<overWriteReleases>false</overWriteReleases>
Expand Down
Loading

0 comments on commit 4c892a2

Please sign in to comment.