Hi, everybody!
I've posted this problem before but I am not sure it could be viewed by
others so i decided to do it one more time and be more specific.. This
problem is killing me. )
Well, I've wrote my own realm. Lets call it MyRealm, package com.company. I
extended it from JdbcRealm and added NO new methods. Btw, JdbcRealm works
perfectly. Of course I need more functionality but it even doesn't work in
this case.
So I added info about MyRealm to shiro.ini.
myRealm= com.company.MyRealm
securityManager.realms = $myRealm
and started debugging..
In ModularRealmAuthenticator in shiro there is a method
protected AuthenticationInfo doAuthenticate(AuthenticationToken
authenticationToken) throws AuthenticationException {
assertRealmsConfigured();
Collection<Realm> realms = getRealms();
if (realms.size() == 1) {
return doSingleRealmAuthentication(realms.iterator().next(),
authenticationToken);
} else {
return doMultiRealmAuthentication(realms, authenticationToken);
}
}
Well, i have no issues with casting to Collection<Realm>. variable realm
contains one my realm. But the method doSingleRealmAuthentication gives me
the cast exception error.. Like myRealm cannot be cast to shiro's interface
Realm.
Can you give me any tips? Thanks in advance!!
--
View this message in context:
http://shiro-user.582556.n2.nabble.com/Custom-Realm-tp7577630.html
Sent from the Shiro User mailing list archive at Nabble.com.