Revert Mail API

---
Quarkus3 branch sync no. 13 (11.4.2023)
Resolved conflicts:
keycloak/quarkus/pom.xml - Modified
---
Quarkus3 branch sync no. 12 (31.3.2023)
Resolved conflicts:
keycloak/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/sessionlimits/UserSessionLimitsTest.java - Modified
This commit is contained in:
Martin Bartoš 2023-01-19 13:10:19 +01:00 committed by Václav Muzikář
parent 1f126647fe
commit b1da7bd613
29 changed files with 90 additions and 63 deletions

13
pom.xml
View file

@ -90,6 +90,8 @@
<!--JAKARTA--> <!--JAKARTA-->
<jakarta.persistence.version>3.1.0</jakarta.persistence.version> <jakarta.persistence.version>3.1.0</jakarta.persistence.version>
<jakarta.mail.version>2.1.1</jakarta.mail.version> <jakarta.mail.version>2.1.1</jakarta.mail.version>
<com.sun.jakarta.mail.version>1.6.5</com.sun.jakarta.mail.version>
<jakarta.servlet.version>6.0.0</jakarta.servlet.version> <jakarta.servlet.version>6.0.0</jakarta.servlet.version>
<jakarta.ws.rs.version>3.1.0</jakarta.ws.rs.version> <jakarta.ws.rs.version>3.1.0</jakarta.ws.rs.version>
<jakarta.xml.ws.version>4.0.0</jakarta.xml.ws.version> <jakarta.xml.ws.version>4.0.0</jakarta.xml.ws.version>
@ -174,7 +176,8 @@
<oracle-jdbc.version>21.5.0.0</oracle-jdbc.version> <oracle-jdbc.version>21.5.0.0</oracle-jdbc.version>
<!-- Test --> <!-- Test -->
<greenmail.version>2.0.0-alpha-3</greenmail.version> <!--<greenmail.version>2.0.0-alpha-3</greenmail.version>-->
<greenmail.version>1.6.12</greenmail.version>
<hamcrest.version>2.2</hamcrest.version> <hamcrest.version>2.2</hamcrest.version>
<jmeter.version>2.10</jmeter.version> <jmeter.version>2.10</jmeter.version>
<junit.version>4.13.2</junit.version> <junit.version>4.13.2</junit.version>
@ -401,10 +404,16 @@
</dependency> </dependency>
<!--JAKARTA--> <!--JAKARTA-->
<dependency> <!--Add this after support of JakartaEE in GreenMail-->
<!--<dependency>
<groupId>jakarta.mail</groupId> <groupId>jakarta.mail</groupId>
<artifactId>jakarta.mail-api</artifactId> <artifactId>jakarta.mail-api</artifactId>
<version>${jakarta.mail.version}</version> <version>${jakarta.mail.version}</version>
</dependency>-->
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>jakarta.mail</artifactId>
<version>${com.sun.jakarta.mail.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>jakarta.ws.rs</groupId> <groupId>jakarta.ws.rs</groupId>

View file

@ -46,7 +46,7 @@
<org.jboss.spec.javax.xml.bind.jboss-jaxb-api_2.3_spec.version>2.0.1.Final</org.jboss.spec.javax.xml.bind.jboss-jaxb-api_2.3_spec.version> <org.jboss.spec.javax.xml.bind.jboss-jaxb-api_2.3_spec.version>2.0.1.Final</org.jboss.spec.javax.xml.bind.jboss-jaxb-api_2.3_spec.version>
<sun.saaj-impl.version>1.4.1.SP1</sun.saaj-impl.version> <sun.saaj-impl.version>1.4.1.SP1</sun.saaj-impl.version>
<org.jvnet.staxex.version>1.8.3</org.jvnet.staxex.version> <org.jvnet.staxex.version>1.8.3</org.jvnet.staxex.version>
<io.agroal.version>1.17</io.agroal.version> <com.sun.jakarta.mail.version>2.0.1</com.sun.jakarta.mail.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.plugin.version>3.8.1</maven.compiler.plugin.version> <maven.compiler.plugin.version>3.8.1</maven.compiler.plugin.version>

View file

@ -572,10 +572,15 @@
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<dependency> <!--<dependency>
<groupId>jakarta.mail</groupId> <groupId>jakarta.mail</groupId>
<artifactId>jakarta.mail-api</artifactId> <artifactId>jakarta.mail-api</artifactId>
<version>${jakarta.mail.version}</version> <version>${jakarta.mail.version}</version>
</dependency>-->
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>jakarta.mail</artifactId>
<version>${com.sun.jakarta.mail.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.santuario</groupId> <groupId>org.apache.santuario</groupId>

View file

@ -55,9 +55,13 @@
<artifactId>freemarker</artifactId> <artifactId>freemarker</artifactId>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <!--<dependency>
<groupId>jakarta.mail</groupId> <groupId>jakarta.mail</groupId>
<artifactId>jakarta.mail-api</artifactId> <artifactId>jakarta.mail-api</artifactId>
</dependency>-->
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>jakarta.mail</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>

View file

@ -26,15 +26,15 @@ import org.keycloak.truststore.HostnameVerificationPolicy;
import org.keycloak.truststore.JSSETruststoreConfigurator; import org.keycloak.truststore.JSSETruststoreConfigurator;
import org.keycloak.vault.VaultStringSecret; import org.keycloak.vault.VaultStringSecret;
import jakarta.mail.Address; import javax.mail.Address;
import jakarta.mail.MessagingException; import javax.mail.MessagingException;
import jakarta.mail.Multipart; import javax.mail.Multipart;
import jakarta.mail.Session; import javax.mail.Session;
import jakarta.mail.Transport; import javax.mail.Transport;
import jakarta.mail.internet.AddressException; import javax.mail.internet.AddressException;
import jakarta.mail.internet.InternetAddress; import javax.mail.internet.InternetAddress;
import jakarta.mail.internet.MimeBodyPart; import javax.mail.internet.MimeBodyPart;
import jakarta.mail.internet.MimeMultipart; import javax.mail.internet.MimeMultipart;
import javax.net.ssl.SSLContext; import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSocketFactory; import javax.net.ssl.SSLSocketFactory;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;

View file

@ -22,7 +22,7 @@ import com.icegreen.greenmail.util.ServerSetup;
import org.junit.rules.ExternalResource; import org.junit.rules.ExternalResource;
import org.keycloak.models.RealmModel; import org.keycloak.models.RealmModel;
import jakarta.mail.internet.MimeMessage; import javax.mail.internet.MimeMessage;
import java.lang.Thread.UncaughtExceptionHandler; import java.lang.Thread.UncaughtExceptionHandler;
import java.net.SocketException; import java.net.SocketException;
import java.util.HashMap; import java.util.HashMap;

View file

@ -17,10 +17,10 @@
package org.keycloak.testsuite.util; package org.keycloak.testsuite.util;
import jakarta.mail.Address; import javax.mail.Address;
import jakarta.mail.MessagingException; import javax.mail.MessagingException;
import jakarta.mail.Multipart; import javax.mail.Multipart;
import jakarta.mail.internet.MimeMessage; import javax.mail.internet.MimeMessage;
import java.io.IOException; import java.io.IOException;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;

View file

@ -5,9 +5,9 @@ import org.subethamail.smtp.MessageHandler;
import org.subethamail.smtp.MessageHandlerFactory; import org.subethamail.smtp.MessageHandlerFactory;
import org.subethamail.smtp.RejectException; import org.subethamail.smtp.RejectException;
import jakarta.mail.MessagingException; import javax.mail.MessagingException;
import jakarta.mail.Session; import javax.mail.Session;
import jakarta.mail.internet.MimeMessage; import javax.mail.internet.MimeMessage;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.IOException; import java.io.IOException;

View file

@ -20,10 +20,10 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import java.io.IOException; import java.io.IOException;
import jakarta.mail.Address; import javax.mail.Address;
import jakarta.mail.Message; import javax.mail.Message;
import jakarta.mail.MessagingException; import javax.mail.MessagingException;
import jakarta.mail.internet.MimeMessage; import javax.mail.internet.MimeMessage;
import org.jboss.arquillian.graphene.page.Page; import org.jboss.arquillian.graphene.page.Page;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Rule; import org.junit.Rule;

View file

@ -61,8 +61,8 @@ import org.keycloak.testsuite.util.UserActionTokenBuilder;
import org.keycloak.testsuite.util.MailUtils; import org.keycloak.testsuite.util.MailUtils;
import java.io.Closeable; import java.io.Closeable;
import jakarta.mail.MessagingException; import javax.mail.MessagingException;
import jakarta.mail.internet.MimeMessage; import javax.mail.internet.MimeMessage;
import java.io.IOException; import java.io.IOException;
import java.net.URISyntaxException; import java.net.URISyntaxException;
import java.util.Arrays; import java.util.Arrays;

View file

@ -21,10 +21,10 @@ import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import java.io.IOException; import java.io.IOException;
import jakarta.mail.Address; import javax.mail.Address;
import jakarta.mail.Message; import javax.mail.Message;
import jakarta.mail.MessagingException; import javax.mail.MessagingException;
import jakarta.mail.internet.MimeMessage; import javax.mail.internet.MimeMessage;
import org.jboss.arquillian.graphene.page.Page; import org.jboss.arquillian.graphene.page.Page;
import org.junit.Rule; import org.junit.Rule;
import org.junit.Test; import org.junit.Test;

View file

@ -27,7 +27,7 @@ import org.keycloak.testsuite.AbstractKeycloakTest;
import org.keycloak.testsuite.util.GreenMailRule; import org.keycloak.testsuite.util.GreenMailRule;
import org.keycloak.testsuite.util.UserBuilder; import org.keycloak.testsuite.util.UserBuilder;
import jakarta.mail.internet.MimeMessage; import javax.mail.internet.MimeMessage;
import jakarta.ws.rs.core.Response; import jakarta.ws.rs.core.Response;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;

View file

@ -88,7 +88,7 @@ import org.keycloak.util.JsonSerialization;
import org.openqa.selenium.By; import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebDriver;
import jakarta.mail.internet.MimeMessage; import javax.mail.internet.MimeMessage;
import jakarta.ws.rs.BadRequestException; import jakarta.ws.rs.BadRequestException;
import jakarta.ws.rs.ClientErrorException; import jakarta.ws.rs.ClientErrorException;
import jakarta.ws.rs.NotFoundException; import jakarta.ws.rs.NotFoundException;

View file

@ -2,7 +2,7 @@ package org.keycloak.testsuite.broker;
import java.util.List; import java.util.List;
import jakarta.mail.internet.MimeMessage; import javax.mail.internet.MimeMessage;
import jakarta.ws.rs.core.Response; import jakarta.ws.rs.core.Response;
import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap;

View file

@ -21,7 +21,7 @@ import static org.junit.Assert.assertEquals;
import static org.keycloak.testsuite.util.WaitUtils.pause; import static org.keycloak.testsuite.util.WaitUtils.pause;
import java.io.IOException; import java.io.IOException;
import jakarta.mail.MessagingException; import javax.mail.MessagingException;
import org.jboss.arquillian.graphene.page.Page; import org.jboss.arquillian.graphene.page.Page;
import org.junit.Test; import org.junit.Test;
import org.keycloak.services.managers.AuthenticationSessionManager; import org.keycloak.services.managers.AuthenticationSessionManager;

View file

@ -33,8 +33,8 @@ import org.keycloak.testsuite.util.MailUtils;
import java.io.IOException; import java.io.IOException;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
import jakarta.mail.MessagingException; import javax.mail.MessagingException;
import jakarta.mail.internet.MimeMessage; import javax.mail.internet.MimeMessage;
import jakarta.ws.rs.core.Response; import jakarta.ws.rs.core.Response;
import org.jboss.arquillian.graphene.page.Page; import org.jboss.arquillian.graphene.page.Page;
import org.junit.Assert; import org.junit.Assert;

View file

@ -23,8 +23,8 @@ import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import jakarta.mail.MessagingException; import javax.mail.MessagingException;
import jakarta.mail.internet.MimeMessage; import javax.mail.internet.MimeMessage;
import org.jboss.arquillian.graphene.page.Page; import org.jboss.arquillian.graphene.page.Page;
import org.junit.ClassRule; import org.junit.ClassRule;

View file

@ -52,7 +52,7 @@ import org.keycloak.testsuite.util.GreenMailRule;
import org.keycloak.testsuite.util.TestCleanup; import org.keycloak.testsuite.util.TestCleanup;
import org.openqa.selenium.Cookie; import org.openqa.selenium.Cookie;
import jakarta.mail.internet.MimeMessage; import javax.mail.internet.MimeMessage;
import jakarta.ws.rs.NotFoundException; import jakarta.ws.rs.NotFoundException;
import jakarta.ws.rs.core.Response; import jakarta.ws.rs.core.Response;
import java.io.File; import java.io.File;

View file

@ -20,8 +20,8 @@ package org.keycloak.testsuite.forms;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import java.io.IOException; import java.io.IOException;
import jakarta.mail.MessagingException; import javax.mail.MessagingException;
import jakarta.mail.internet.MimeMessage; import javax.mail.internet.MimeMessage;
import org.jboss.arquillian.graphene.page.Page; import org.jboss.arquillian.graphene.page.Page;
import org.junit.Before; import org.junit.Before;
import org.junit.Rule; import org.junit.Rule;

View file

@ -49,7 +49,7 @@ import org.keycloak.testsuite.util.OAuthClient;
import org.keycloak.testsuite.util.RealmRepUtil; import org.keycloak.testsuite.util.RealmRepUtil;
import org.keycloak.testsuite.util.UserBuilder; import org.keycloak.testsuite.util.UserBuilder;
import jakarta.mail.internet.MimeMessage; import javax.mail.internet.MimeMessage;
import java.net.MalformedURLException; import java.net.MalformedURLException;
import java.util.Calendar; import java.util.Calendar;
import java.util.Collections; import java.util.Collections;

View file

@ -51,7 +51,7 @@ import org.keycloak.testsuite.util.MailUtils;
import org.keycloak.testsuite.util.OAuthClient; import org.keycloak.testsuite.util.OAuthClient;
import org.keycloak.testsuite.util.UserBuilder; import org.keycloak.testsuite.util.UserBuilder;
import jakarta.mail.internet.MimeMessage; import javax.mail.internet.MimeMessage;
import jakarta.ws.rs.core.Response; import jakarta.ws.rs.core.Response;
import java.io.IOException; import java.io.IOException;

View file

@ -48,7 +48,7 @@ import org.keycloak.testsuite.pages.PasswordPage;
import org.keycloak.testsuite.pages.RegisterPage; import org.keycloak.testsuite.pages.RegisterPage;
import org.keycloak.testsuite.util.*; import org.keycloak.testsuite.util.*;
import jakarta.mail.internet.MimeMessage; import javax.mail.internet.MimeMessage;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;

View file

@ -63,8 +63,8 @@ import org.keycloak.testsuite.util.SecondBrowser;
import org.keycloak.testsuite.util.UserActionTokenBuilder; import org.keycloak.testsuite.util.UserActionTokenBuilder;
import org.keycloak.testsuite.util.UserBuilder; import org.keycloak.testsuite.util.UserBuilder;
import jakarta.mail.MessagingException; import javax.mail.MessagingException;
import jakarta.mail.internet.MimeMessage; import javax.mail.internet.MimeMessage;
import java.io.Closeable; import java.io.Closeable;
import java.io.IOException; import java.io.IOException;

View file

@ -20,8 +20,8 @@ import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.is;
import jakarta.mail.MessagingException; import javax.mail.MessagingException;
import jakarta.mail.internet.MimeMessage; import javax.mail.internet.MimeMessage;
import java.io.IOException; import java.io.IOException;
import java.util.Arrays; import java.util.Arrays;
import org.jboss.arquillian.graphene.page.Page; import org.jboss.arquillian.graphene.page.Page;

View file

@ -19,10 +19,10 @@ package org.keycloak.testsuite.util;
import org.jboss.logging.Logger; import org.jboss.logging.Logger;
import jakarta.mail.MessagingException; import javax.mail.MessagingException;
import jakarta.mail.internet.MimeMessage; import javax.mail.internet.MimeMessage;
import jakarta.mail.internet.MimeMessage.RecipientType; import javax.mail.internet.MimeMessage.RecipientType;
import jakarta.mail.internet.MimeMultipart; import javax.mail.internet.MimeMultipart;
import java.io.IOException; import java.io.IOException;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;

View file

@ -21,10 +21,10 @@ import com.icegreen.greenmail.util.GreenMail;
import com.icegreen.greenmail.util.ServerSetup; import com.icegreen.greenmail.util.ServerSetup;
import org.jboss.logging.Logger; import org.jboss.logging.Logger;
import jakarta.mail.MessagingException; import javax.mail.MessagingException;
import jakarta.mail.internet.MimeMessage; import javax.mail.internet.MimeMessage;
import jakarta.mail.internet.MimeMessage.RecipientType; import javax.mail.internet.MimeMessage.RecipientType;
import jakarta.mail.internet.MimeMultipart; import javax.mail.internet.MimeMultipart;
import java.io.IOException; import java.io.IOException;
import java.lang.Thread.UncaughtExceptionHandler; import java.lang.Thread.UncaughtExceptionHandler;
import java.net.SocketException; import java.net.SocketException;

View file

@ -20,7 +20,7 @@ package org.keycloak.testsuite.util;
import org.jboss.logging.Logger; import org.jboss.logging.Logger;
import org.subethamail.smtp.server.SMTPServer; import org.subethamail.smtp.server.SMTPServer;
import jakarta.mail.internet.MimeMessage; import javax.mail.internet.MimeMessage;
import javax.net.ssl.KeyManagerFactory; import javax.net.ssl.KeyManagerFactory;
import javax.net.ssl.SSLContext; import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSocket; import javax.net.ssl.SSLSocket;

View file

@ -35,9 +35,13 @@
<dependencies> <dependencies>
<dependency> <!--<dependency>
<groupId>jakarta.mail</groupId> <groupId>jakarta.mail</groupId>
<artifactId>jakarta.mail-api</artifactId> <artifactId>jakarta.mail-api</artifactId>
</dependency>-->
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>jakarta.mail</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.bouncycastle</groupId> <groupId>org.bouncycastle</groupId>
@ -286,6 +290,11 @@
<version>${mssql-jdbc.version}</version> <version>${mssql-jdbc.version}</version>
</dependency> </dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons-io.version}</version>
</dependency>
</dependencies> </dependencies>

View file

@ -20,9 +20,9 @@ package org.keycloak.testsuite;
import com.icegreen.greenmail.util.GreenMail; import com.icegreen.greenmail.util.GreenMail;
import com.icegreen.greenmail.util.ServerSetup; import com.icegreen.greenmail.util.ServerSetup;
import jakarta.mail.internet.MimeMessage; import javax.mail.internet.MimeMessage;
import jakarta.mail.internet.MimeMessage.RecipientType; import javax.mail.internet.MimeMessage.RecipientType;
import jakarta.mail.internet.MimeMultipart; import javax.mail.internet.MimeMultipart;
public class MailServer { public class MailServer {