Cleanup of adapter-spi module?
Closes#30871 Signed-off-by: Douglas Palmer <dpalmer@redhat.com>
This commit is contained in:
parent
c4ebd0cd0c
commit
7a8c7502d2
6 changed files with 0 additions and 175 deletions
|
@ -1,15 +0,0 @@
|
|||
# Adapter SPI
|
||||
|
||||
This module is primarily used for custom adapters in the testsuite.
|
||||
|
||||
## Undertow
|
||||
Modules related to Undertow:
|
||||
* Keycloak Undertow Adapter SPI (`undertow-adapter-spi-jakarta`)
|
||||
* Keycloak Undertow SAML adapter (`undertow-adapter-saml-jakarta`)
|
||||
|
||||
These modules are automatically generated from the Keycloak adapters module (`/adapters`) and converted to adapters supporting JakartaEE.
|
||||
|
||||
You can override files from the original module by putting the class with the same name into the `src` directory.
|
||||
Do not forget to edit `.gitignore` file for changes, which should be kept in the module.
|
||||
|
||||
You can check the behavior in `undertow-adapter-spi-jakarta` module and class `UndertowHttpServletRequest`.
|
|
@ -1,24 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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">
|
||||
<parent>
|
||||
<artifactId>integration-arquillian-servers</artifactId>
|
||||
<groupId>org.keycloak.testsuite</groupId>
|
||||
<version>999.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<artifactId>integration-arquillian-servers-adapter-spi</artifactId>
|
||||
<name>Testsuite Adapter SPI</name>
|
||||
|
||||
<modules>
|
||||
<module>undertow-adapter-spi-jakarta</module>
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
<!-- For more information, see https://github.com/apache/ant/pull/200 -->
|
||||
<ant.jvm.args>-Djava.security.manager=allow</ant.jvm.args>
|
||||
</properties>
|
||||
</project>
|
|
@ -1,2 +0,0 @@
|
|||
/src/main/java/org/keycloak/adapters/undertow/*
|
||||
!/src/main/java/org/keycloak/adapters/undertow/UndertowHttpServletRequest.java
|
|
@ -1,91 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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">
|
||||
<parent>
|
||||
<artifactId>integration-arquillian-servers-adapter-spi</artifactId>
|
||||
<groupId>org.keycloak.testsuite</groupId>
|
||||
<version>999.0.0-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>keycloak-undertow-adapter-spi-jakarta</artifactId>
|
||||
<name>Adapter Undertow SPI (JakartaEE)</name>
|
||||
|
||||
<properties>
|
||||
<undertow-adapter-base>${project.basedir}/../../../../../adapters/spi/undertow-adapter-spi</undertow-adapter-base>
|
||||
<jakarta-transformer-sources>${undertow-adapter-base}/src/main/java/org/keycloak/adapters/undertow/</jakarta-transformer-sources>
|
||||
<jakarta-transformer-target>${project.basedir}/src/main/java/org/keycloak/adapters/undertow/</jakarta-transformer-target>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-adapter-spi</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-common</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.undertow</groupId>
|
||||
<artifactId>undertow-servlet</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.undertow</groupId>
|
||||
<artifactId>undertow-core</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>transform</id>
|
||||
<phase>initialize</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<target>
|
||||
<property name="plugin_classpath" refid="maven.plugin.classpath" />
|
||||
<java classname="org.eclipse.transformer.cli.JakartaTransformerCLI" fork="true">
|
||||
<arg value="-o" />
|
||||
<arg value="${jakarta-transformer-sources}" />
|
||||
<arg value="${jakarta-transformer-target}/tmp" />
|
||||
<classpath>
|
||||
<pathelement path="${plugin_classpath}" />
|
||||
</classpath>
|
||||
</java>
|
||||
<touch>
|
||||
<fileset dir="${jakarta-transformer-target}"/>
|
||||
</touch>
|
||||
<copy todir="${jakarta-transformer-target}" overwrite="false">
|
||||
<fileset dir="${jakarta-transformer-target}/tmp"/>
|
||||
</copy>
|
||||
<delete dir="${jakarta-transformer-target}/tmp"/>
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.transformer</groupId>
|
||||
<artifactId>org.eclipse.transformer.cli</artifactId>
|
||||
<version>0.5.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.ant</groupId>
|
||||
<artifactId>ant</artifactId>
|
||||
<version>1.10.14</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
|
@ -1,42 +0,0 @@
|
|||
package org.keycloak.adapters.undertow;
|
||||
|
||||
import jakarta.servlet.ReadListener;
|
||||
import jakarta.servlet.ServletInputStream;
|
||||
import jakarta.servlet.ServletRequest;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletRequestWrapper;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
public class UndertowHttpServletRequest {
|
||||
|
||||
public static HttpServletRequestWrapper setupServletInputStream(ServletRequest servletRequest, InputStream inputStream) {
|
||||
return new HttpServletRequestWrapper((HttpServletRequest) servletRequest) {
|
||||
@Override
|
||||
public ServletInputStream getInputStream() {
|
||||
inputStream.mark(0);
|
||||
return new ServletInputStream() {
|
||||
@Override
|
||||
public boolean isFinished() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isReady() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setReadListener(ReadListener readListener) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int read() throws IOException {
|
||||
return inputStream.read();
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
|
@ -44,7 +44,6 @@
|
|||
</properties>
|
||||
|
||||
<modules>
|
||||
<module>adapter-spi</module>
|
||||
<module>auth-server</module>
|
||||
<module>app-server</module>
|
||||
<module>cache-server</module>
|
||||
|
|
Loading…
Reference in a new issue