Hi, Paul.

I just had this same problem, and it took me almost a week to figure out
because of the lack of documentation, but the solution is actually quite
simple.

In my case, I had a UserToken that extends UsernamePasswordToken, but still
got the same "Realm...does not support..." error.  I figured out that I
needed to replace the default "authc" filer (defined as
FormAuthenticationFilter in org.apache.shiro.web.filter.mgt.DefaultFilter)
with a custom filter that used my tokens instead of UsernamePasswordToken.

To do so, I extended FormAuthenticationFilter simply:


Then specify this filter in shiro.ini:


That's all!  You can just set your "authc" filter to be your custom filter,
which should return your custom token.  Good luck.



--
View this message in context: 
http://shiro-user.582556.n2.nabble.com/Setting-realm-authenticationTokenClass-from-ini-file-tp7579043p7579079.html
Sent from the Shiro User mailing list archive at Nabble.com.

Reply via email to