Ignore adapters

This commit is contained in:
Martin Bartoš 2023-01-04 17:45:56 +01:00 committed by Václav Muzikář
parent e505021681
commit ceed48a45a
8 changed files with 46 additions and 16 deletions

View file

@ -29,11 +29,10 @@
<artifactId>keycloak-oidc-client-adapter-pom</artifactId> <artifactId>keycloak-oidc-client-adapter-pom</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<modules> <modules>
<module>adapter-core</module> <module>adapter-core</module>
<module>installed</module> <module>installed</module>
<module>jaxrs-oauth-client</module> <!-- <module>jaxrs-oauth-client</module>
<module>jetty</module> <module>jetty</module>
<module>js</module> <module>js</module>
<module>servlet-filter</module> <module>servlet-filter</module>
@ -45,6 +44,6 @@
<module>tomcat</module> <module>tomcat</module>
<module>undertow</module> <module>undertow</module>
<module>wildfly</module> <module>wildfly</module>
<module>wildfly-elytron</module> <module>wildfly-elytron</module>-->
</modules> </modules>
</project> </project>

View file

@ -33,9 +33,9 @@
<modules> <modules>
<module>core-public</module> <module>core-public</module>
<module>core</module> <module>core</module>
<module>jetty</module> <!--<module>jetty</module>-->
<module>undertow</module> <!--<module>undertow</module>
<module>tomcat</module> <module>tomcat</module>-->
<module>wildfly</module> <module>wildfly</module>
<module>servlet-filter</module> <module>servlet-filter</module>
<module>jakarta-servlet-filter</module> <module>jakarta-servlet-filter</module>

View file

@ -68,9 +68,8 @@
<artifactId>keycloak-crypto-default</artifactId> <artifactId>keycloak-crypto-default</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.jboss.spec.javax.servlet</groupId> <groupId>jakarta.servlet</groupId>
<artifactId>jboss-servlet-api_3.0_spec</artifactId> <artifactId>jakarta.servlet-api</artifactId>
<scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>

View file

@ -67,9 +67,8 @@
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.jboss.spec.javax.servlet</groupId> <groupId>jakarta.servlet</groupId>
<artifactId>jboss-servlet-api_3.0_spec</artifactId> <artifactId>jakarta.servlet-api</artifactId>
<scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.wildfly.security</groupId> <groupId>org.wildfly.security</groupId>

View file

@ -32,11 +32,11 @@
<modules> <modules>
<module>adapter-spi</module> <module>adapter-spi</module>
<module>tomcat-adapter-spi</module> <!--<module>tomcat-adapter-spi</module>-->
<module>undertow-adapter-spi</module> <module>undertow-adapter-spi</module>
<module>servlet-adapter-spi</module> <module>servlet-adapter-spi</module>
<module>jakarta-servlet-adapter-spi</module> <module>jakarta-servlet-adapter-spi</module>
<module>jboss-adapter-core</module> <module>jboss-adapter-core</module>
<module>jetty-adapter-spi</module> <!--<module>jetty-adapter-spi</module>-->
</modules> </modules>
</project> </project>

View file

@ -54,8 +54,8 @@
<artifactId>keycloak-common</artifactId> <artifactId>keycloak-common</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.jboss.spec.javax.servlet</groupId> <groupId>jakarta.servlet</groupId>
<artifactId>jboss-servlet-api_3.0_spec</artifactId> <artifactId>jakarta.servlet-api</artifactId>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>

View file

@ -17,6 +17,7 @@
package org.keycloak.adapters.servlet; package org.keycloak.adapters.servlet;
import jakarta.servlet.ReadListener;
import org.keycloak.adapters.spi.AdapterSessionStore; import org.keycloak.adapters.spi.AdapterSessionStore;
import org.keycloak.adapters.spi.HttpFacade; import org.keycloak.adapters.spi.HttpFacade;
import org.keycloak.adapters.spi.KeycloakAccount; import org.keycloak.adapters.spi.KeycloakAccount;
@ -174,6 +175,21 @@ public class FilterSessionStore implements AdapterSessionStore {
if (needRequestRestore && body != null) { if (needRequestRestore && body != null) {
final ByteArrayInputStream is = new ByteArrayInputStream(body); final ByteArrayInputStream is = new ByteArrayInputStream(body);
return new ServletInputStream() { return new ServletInputStream() {
@Override
public boolean isFinished() {
return false;
}
@Override
public boolean isReady() {
return false;
}
@Override
public void setReadListener(ReadListener readListener) {
}
@Override @Override
public int read() throws IOException { public int read() throws IOException {
return is.read(); return is.read();

View file

@ -27,6 +27,7 @@ import io.undertow.servlet.handlers.ServletRequestContext;
import io.undertow.util.AttachmentKey; import io.undertow.util.AttachmentKey;
import io.undertow.util.Headers; import io.undertow.util.Headers;
import io.undertow.util.HttpString; import io.undertow.util.HttpString;
import jakarta.servlet.ReadListener;
import org.keycloak.adapters.spi.AuthenticationError; import org.keycloak.adapters.spi.AuthenticationError;
import org.keycloak.adapters.spi.HttpFacade; import org.keycloak.adapters.spi.HttpFacade;
import org.keycloak.adapters.spi.LogoutError; import org.keycloak.adapters.spi.LogoutError;
@ -201,6 +202,22 @@ public class UndertowHttpFacade implements HttpFacade {
public ServletInputStream getInputStream() { public ServletInputStream getInputStream() {
inputStream.mark(0); inputStream.mark(0);
return new ServletInputStream() { return new ServletInputStream() {
//TODO
@Override
public boolean isFinished() {
return false;
}
@Override
public boolean isReady() {
return false;
}
@Override
public void setReadListener(ReadListener readListener) {
}
@Override @Override
public int read() throws IOException { public int read() throws IOException {
return inputStream.read(); return inputStream.read();