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

AbstractLoginModule porting issue #11296

Closed
brettwooldridge opened this issue Jan 20, 2024 · 1 comment · Fixed by #11297
Closed

AbstractLoginModule porting issue #11296

brettwooldridge opened this issue Jan 20, 2024 · 1 comment · Fixed by #11297
Labels

Comments

@brettwooldridge
Copy link

brettwooldridge commented Jan 20, 2024

Jetty Version
Jetty 9 to Jetty 12 migration

Jetty Environment
ee9

Java Version
Java 17

Question
I am trying to port our Jetty 9 application to Jetty 12, and have run into an issue with our current implementation of AbstractLoginModule. Our current implemenation provides an implemenation of the getUserInfo() method, in fact that is where most of the heavy-lifting is done, but this method is missing from the current implementation.

However, the class documentation from AbstractLoginModule still references overriding this method as the work that needs to be done:

/**
 * AbstractLoginModule
 *
 * Abstract base class for all LoginModules. Subclasses should
 * just need to implement getUserInfo method.
 */

I don't understand what the current correct pattern is for using the AbstractLoginModule.

The "old" AbstractLoginModule imposed this signature, however it is now missing from the class definition:

public UserInfo getUserInfo(String username)
@janbartel
Copy link
Contributor

@brettwooldridge oops, old javadoc comment left in that class. Take a look at the subclasses of AbstractLoginModule like AbstractDatabaseLoginModule. You need to implement the getUser(String username) method, and to subclass the JAASUser class to implement the doFetchRoles method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants