On 20 October 2014 05:22, Waypoint D <[email protected]
<javascript:_e(%7B%7D,'cvml','[email protected]');>> wrote:

> Greetings,
>
>
Hi John,
welcome to the Isis mailing list.




>        I am trying to build a webapp which uses apache shiro and google
> guice.   I have been following a [1] tutorial, but cannot seem to get code
> to compile with the realm I need to use.  In particular, I am not sure what
> to supply for the following sections of code (which has been edited for
> readability)...
>
>
I presume you're building an Isis webapp, in which case the bootstrapping
is taken care of for you.  Isis already integrates with Shiro, and the
WEB-INF/shiro.ini file is the one that is read from.  There should be no
need to build your own Guice module.

You might want to check out the new isis-module-security [1] add-on [2],
which provides an out-of-the-box realm for pluggable authentication and
also authorization.

If the above doesn't fit, let us know a bit more what you're wanting to
do...

Cheers
Dan

[1] https://github.com/isisaddons/isis-module-security
[2] http://www.isisaddons.org/



> *file:BigBankShiroWebModule.java*
>     public class BigBankShiroWebModule extends ShiroWebModule {
>         protected void configureShiroWeb() {
>             bindRealm().toConstructor( IniRealm.class.getConstructor(
> Ini.class ) );
>         }
>         Ini loadShiroIni() {
>             return Ini.fromResourcePath( "classpath:shiro.ini" );
>         }
>
> I have tried to replace *IniRealm *with *IsisLdapRealm *or
> *JndiLdapRealm *which
> seems to work to a degree, but they wont load my *shiro.ini* file since
> those realms don't implement the *Ini *class.  Since the realm I need to
> use does not support ini files, how can I configure the realm?
>
> Help is appreciated more than you know!
> - John
>
>
> *Web link appendix*   [1] Add an example for using Guice integration.
>    https://issues.apache.org/jira/browse/SHIRO-320
>

Reply via email to