Take a look an existing Realm for more concrete example, basically, you just extend `AuthenticationRealm` and implement the `doGetAuthenticationInfo()` method.
Your custom logic would likely query your db and check to see if authentication should happen from a DB realm or an LDAP realm. You might have some logic like: if (authViaDB) { return dbRealm.getAuthenticationInfo(...); } else { return adRealm.getAuthenticationInfo(...); } I'm guessing the AD Realm portion will not be as simple as you have the connection information contained in your database (you would need to figure out how you wanted to manage these connections, connection pool, configure a new AD realm for each auth attempt, etc) On Mon, Apr 30, 2018 at 11:30 AM, Debug82 <nas...@hotmail.com> wrote: > Hi Brian, > > Thanks a lot for your prompt reply. > It helps a lot. > > Just one question for the first option. How can I create a custom realm > that > delegates the authentication process to a JDBC or AD realm? > > Thanks again > > Regards > > > > -- > Sent from: http://shiro-user.582556.n2.nabble.com/ >