Hi Filipe, One idea is to create a custom AuthenticationToken class (maybe a subclass of UsernamePasswordToken?) that additionally contains a discriminator field of some sort. In your Realm's 'supports' method implementation, you can check the discriminator property of the custom AuthenticationToken and only return true if that Realm should process that token. You would probably also need to create a new AuthenticationFilter implementation (and call it 'authc', overriding the old one) that knows how to construct your custom token and set the discriminator based on the URL.
Another approach is to create a custom Authenticator that knows how to dispatch the token to the respective realms (e.g. in shiro.ini: securityManager.authenticator = $myCustomAuthenticator). HTH, Les On Tue, Jan 18, 2011 at 6:12 AM, Filipe Sousa <[email protected]> wrote: > Is it possible to use different realms for different URLs. > > Here's what I need: > > [urls] > /myapp/** authc <-- jdbc realm > /portal/** authc <-- ldap realm > > Thanks > -- > Filipe Sousa
