Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump org.eclipse.jetty:jetty-server from 8.1.15.v20140411 to 9.4.51.v20230217 in /OpenICF-groovy-connector #18

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>