简体   繁体   中英

Java EE Security framework without involving the server

I was looking into the security model of Java EE. It seems that the model involves configuring the web server (I am using glassfish 4.0).

What I am looking for is a security framework which I can add without any configuration of the server. For example-

I might pass my database credentials when starting the web application to one of the configuration classes of that framework, then I can call methods like- user.isAuthenticated() etc.

Another side question is, if I am using hibernate orm and also the Java EE security model then my hibernate is configured to connect to database and also my glassfish server is connected to the database. So is there any way I can skip connecting to the database only with hibernate but also use a security framework?

If you have a minimal familiarity with Spring Framework, take a look a this tutorial

There isn't server involvement. You can implement your own user.isAuthenticated() method.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM