shiro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "" <>
Subject JDBC Realm access to HttpSession
Date Thu, 24 Nov 2011 17:39:22 GMT

I am new to shiro and I'm trying to implement a custom jdbc realm.
In my custom realm class I am extending JdbcRealm and overriding

The problem I have is that our users table allows duplicate usernames shared
across different clients so our query will look like this:
"Select * from users where username=? and client=?;"

I can get the username to pass to the query quite easily from the
AuthenticationToken but I need a way to access the client value also which
is available in a session variable. 
My questions for now are
1) I think if I create a member variable in the class and I'm able to set
that variable before the doGetAuthenticationInfo method is called that would
solve my problem. If this is possible I need to know where I could set the

2) Is there an way to  access HttpSession variables in my realm class ?

3) Does anybody have a better solution to this problem?


View this message in context:
Sent from the Shiro Developer mailing list archive at

View raw message