sim51 / logisima-play-cas

CAS authentification module (SSO)
http://www.bsimard.com
19 stars 8 forks source link

question : why not using Security.isConnected() #2

Closed sdenef closed 13 years ago

sdenef commented 13 years ago

Hello,

In the method filter() why using this ? if (session.contains("username")) {

Why not using this code ? if (Security.isConnected()) {

sim51 commented 13 years ago

Because in your application, you have to override security class !! (to perform the security of your application) !

When you do that, you can override everything you want on the following method :

That's why, I prefer to do this check directly into the filter (and not into Security class).

If you look at line 94, I put manually the username in session, and after I invoke "Security.onAuthenticated()". It's a personal choice.

To do what you want, I have to change :

sdenef commented 13 years ago

OK. I understand.