Active Directory User Authentication

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
7/15/2011 2:10:47 PM
Gravatar
Total Posts 7

Active Directory User Authentication

Hello Everyone,

I have a proposal for a change to the Ldap authentication method.

Can we add a property to the Ldapsettings to be able to specify what we want to filter by when searching ldap?

File: mojoPortal.Business\LdapUser.cs

Function: public LdapUser(DirectoryEntry adentry, String userName, LdapSettings ldapSettings)

Current Code:

DirectorySearcher ds = new DirectorySearcher(adentry);
ds.Filter = "(&(sAMAccountName=" + userName + "))";
DirectoryEntry ent = ds.FindOne().GetDirectoryEntry();

Proposed Code:

DirectorySearcher ds = new DirectorySearcher(adentry);
ds.Filter = "(&(" + ldapSettings.searchFilter + "=" + userName + "))";
DirectoryEntry ent = ds.FindOne().GetDirectoryEntry();

 

By doing this it will enable us to be able to specify which object attribute that we want to search by.

Currently in my organization we are using email addresses as user ids. This is because there are occurrences where the same user name will appear but the email address is different.

E.g.

John Johnston - jjohnston@companyy.com

James Johnston - jjohnston@companyx.com

I look forward to your feedback.

Thanks

Hazard

7/18/2011 6:27:10 AM
Gravatar
Total Posts 18439

Re: Active Directory User Authentication

Hi Hazard,

I'm not opposed to this change but it is not as trivial as what you posted, if it only required that change I would make the change today, but it requires a new field in the database to contain the new ldap setting.

I've logged it in our project tracker as a wish list item so I will get to it whenever I get a chance.

Best,

Joe

7/19/2011 8:43:37 AM
Gravatar
Total Posts 7

Re: Active Directory User Authentication

Thank you for the reply and adding this to the wish list.

 

Thanks

 

Hazard

You must sign in to post in the forums. This thread is closed to new posts.