Skip to content

Commit

Permalink
Bump org.eclipse.jetty:jetty-server from 8.1.15.v20140411 to 9.4.51.v…
Browse files Browse the repository at this point in the history
…20230217 in /OpenICF-groovy-connector (#18)

* Bump org.eclipse.jetty:jetty-server in /OpenICF-groovy-connector

Bumps org.eclipse.jetty:jetty-server from 8.1.15.v20140411 to 9.4.51.v20230217.

---
updated-dependencies:
- dependency-name: org.eclipse.jetty:jetty-server
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

* Jetty fix test

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Valera V Harseko <vharseko@3a-systems.ru>
  • Loading branch information
dependabot[bot] and vharseko committed Mar 22, 2024
1 parent 38351df commit 94ab69d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 32 deletions.
4 changes: 2 additions & 2 deletions OpenICF-groovy-connector/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,13 @@
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
<version>8.1.15.v20140411</version>
<version>9.4.51.v20230217</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>8.1.15.v20140411</version>
<version>9.4.51.v20230217</version>
<scope>test</scope>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@
import java.io.IOException;
import java.util.Arrays;

import org.eclipse.jetty.security.ConstraintMapping;
import org.eclipse.jetty.security.ConstraintSecurityHandler;
import org.eclipse.jetty.security.MappedLoginService;
import org.eclipse.jetty.security.SecurityHandler;
import org.eclipse.jetty.security.*;
import org.eclipse.jetty.security.authentication.BasicAuthenticator;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.UserIdentity;
Expand Down Expand Up @@ -82,21 +79,12 @@ private SecurityHandler getSecurityHandler() throws IOException {
sh.setAuthenticator(new BasicAuthenticator());
sh.setConstraintMappings(Arrays.asList(new ConstraintMapping[]{cm}));

MappedLoginService loginService = new MappedLoginService() {

@Override
protected UserIdentity loadUser(String username) {
return null;
}

@Override
protected void loadUsers() throws IOException {
Credential credential = Credential.getCredential("Passw0rd");
String[] roles = new String[]{"user"};
putUser("admin", credential, roles);

}
};
HashLoginService loginService = new HashLoginService();
UserStore us=new UserStore();
Credential credential = Credential.getCredential("Passw0rd");
String[] roles = new String[]{"user"};
us.addUser("admin", credential, roles);
loginService.setUserStore(us);
loginService.setName("user");
sh.setLoginService(loginService);
sh.setConstraintMappings(Arrays.asList(new ConstraintMapping[]{cm}));
Expand All @@ -111,7 +99,7 @@ public void startServer() throws Exception {

server = new Server(Integer.parseInt(httpPort));
for (org.eclipse.jetty.server.Connector c : server.getConnectors()) {
c.setHost("127.0.0.1");
//c.setHost("127.0.0.1");
}

// Initializing the security handler
Expand Down
18 changes: 8 additions & 10 deletions OpenICF-java-framework/connector-server-jetty/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@

<properties>
<!-- maven-compiler-plugin -->
<maven.compiler.target>1.7</maven.compiler.target>
<maven.compiler.source>1.7</maven.compiler.source>
<jetty.version>9.4.51.v20230217</jetty.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
Expand Down Expand Up @@ -125,14 +123,14 @@
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<reuseForks>false</reuseForks>
<shutdown>kill</shutdown>
<forkedProcessTimeoutInSeconds>300</forkedProcessTimeoutInSeconds>
</configuration>
</plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<reuseForks>false</reuseForks>
<shutdown>kill</shutdown>
<forkedProcessTimeoutInSeconds>300</forkedProcessTimeoutInSeconds>
</configuration>
</plugin>
</plugins>
</build>
</project>

0 comments on commit 94ab69d

Please sign in to comment.