-
Notifications
You must be signed in to change notification settings - Fork 130
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
Upgrade Jetty 9.2.15 → 9.4.5 #63
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -183,6 +183,7 @@ | |
import org.eclipse.jetty.http.MimeTypes; | ||
import org.eclipse.jetty.security.HashLoginService; | ||
import org.eclipse.jetty.security.LoginService; | ||
import org.eclipse.jetty.security.UserStore; | ||
import org.eclipse.jetty.server.HttpConfiguration; | ||
import org.eclipse.jetty.server.HttpConnectionFactory; | ||
import org.eclipse.jetty.server.Server; | ||
|
@@ -685,9 +686,11 @@ public Thread newThread(Runnable r) { | |
protected LoginService configureUserRealm() { | ||
HashLoginService realm = new HashLoginService(); | ||
realm.setName("default"); // this is the magic realm name to make it effective on everywhere | ||
realm.update("alice", new Password("alice"), new String[]{"user","female"}); | ||
realm.update("bob", new Password("bob"), new String[]{"user","male"}); | ||
realm.update("charlie", new Password("charlie"), new String[]{"user","male"}); | ||
UserStore userStore = new UserStore(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Forced by Jetty changes as detailed in jetty/jetty.project#1488 (comment). This makes it awkward to switch Jetty versions in a plugin back to 9.2.x, which @vivek says is currently necessary for Wiremock compatibility: you must use @Rule
public JenkinsRule r = new JenkinsRule() {
@Override
protected LoginService configureUserRealm() {
HashLoginService realm = new HashLoginService();
realm.setName("default");
return realm;
}
}; We cannot simply delete the |
||
realm.setUserStore( userStore ); | ||
userStore.addUser("alice", new Password("alice"), new String[]{"user","female"}); | ||
userStore.addUser("bob", new Password("bob"), new String[]{"user","male"}); | ||
userStore.addUser("charlie", new Password("charlie"), new String[]{"user","male"}); | ||
|
||
return realm; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why would you need the explicit versions here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also curious about this. The parent POM defines these versions IIUC.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well it's really to use more up2date versions :-)