Hi Matt,

Manoj is correct - that is how you do it via code.

But if you're using the Servlet filter approach, you can just define the
following in the ShiroFilter's text config in the [main] section:

activeDirectoryRealm =
org.apache.shiro.realm.activedirectory.ActiveDirectoryRealm
# because ActiveDirectoryRealm subclasses AbstractLdapRealm, you have access
to those properties too:
#activeDirectoryRealm.systemUsername = foo
#activeDirectoryRealm.systemPassword = bar
# etc.

Cheers,

Les

On Wed, Jun 24, 2009 at 9:15 PM, Manoj Khangaonkar <[email protected]>wrote:

> The QuickStart example sets the text file based realm with the line of code
>
> SecurityManager.setRealm(new PropertiesRealm()) ;
>
> Did you try
>
> SecurityManager.setRealm(new ActiveDirectoryRealm()) ;
>
> ?
>
> Manoj
>
>
>
>
> On Wed, Jun 24, 2009 at 12:02 PM, Ancaeus <[email protected]> wrote:
>
>>
>> This newbie would like your help in using the Active Directory realm with
>> the
>> NON-web quickstart example.   How do I insert the Active Directory Realm
>> object into the program?  How do I point the program towards my Active
>> Directory server?
>>
>>  Ideally, in the end, I would like to detect that I am already logged in
>> on
>> my workstation (which relies on Active Directory), and use those
>> credentials.  Alternatively I could, log in with username and password via
>> Active Directory.
>>
>> I have been looking for some documentation on Shiro, without success.  All
>> I
>> have found is the Javadoc.  Is there any documentation explaining how it
>> works (i.e., not in the form of a recipe)?
>>
>> Thanks very much.
>>
>> Matt Stillerman
>> --
>> View this message in context:
>> http://n2.nabble.com/Using-Active-Directory-realm-with--Quickstart-tp3150734p3150734.html
>> Sent from the Shiro User mailing list archive at Nabble.com.
>>
>>
>

Reply via email to