Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Accessing Jetty LoginModule

Hi Marco,

You're going to have to step outside of the servlet spec here, as the
api is really centered around the container taking care of
authentication and authorization details for you.

If you're happy to step outside of the spec, then have a look at the
org.eclipse.jetty.security.DefaultUserIdentity class, as it contains
the info you need.

Jan

On 12 July 2013 06:55, Marco Matchefts <mmatchefts@xxxxxxxxxxx> wrote:
> Hello,
>
>     I am implementing a rest interface using Jersey and Jetty.  The Jetty
> version is version 9.0.4.  I have implemented authentication using form
> based authentication and a JAAS login service.  The JAAS login service uses
> the JDBCLoginModule for authentication
> [org.eclipse.jetty.jaas.spi.JDBCLoginModule].  In the rest interface
> implementation, I need to retrieve the list of roles associated with the
> session user.
>
> I have not been able to figure out how to retrieve the list of roles
> associated with a specified user.  I did notice that the AbstractLoginModule
> provides a function for retrieving the UserInfo from the username, which
> contains the user’s roles.  Is there a way to access the LoginModule
> associated with the web application in the web application?  Is there
> another/better way to retrieve this information?
>
> Thank you in advance.
>
> --Marco
>
>
> _______________________________________________
> jetty-users mailing list
> jetty-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/jetty-users
>



-- 
Jan Bartel <janb@xxxxxxxxxxx>
www.webtide.com – Developer advice, services and support
from the Jetty & CometD experts.


Back to the top