Giter Club home page Giter Club logo

Comments (4)

Nordes avatar Nordes commented on July 20, 2024

Sorry for very late reply,

No, not really, both are fundamentally different. OpenLdap have completely different attributes (as Samba does). Please open the implementation, normally you should see what I mean. I think that some simplification in the project could be added, it wouldn't hurt, for sure.

The code makes it possible to also add your own "AddLdap" ... or instead of inMemory/redis use your own provider. Details should be added within the Wiki. For now I have no time for that, I am sorry.

from identityserver4.ldapextension.

Nordes avatar Nordes commented on July 20, 2024

Please close the issue if you consider the answer ok.

from identityserver4.ldapextension.

murattdogan avatar murattdogan commented on July 20, 2024

I'm trying to query openldap and active directory ldap with a single Ldap AppUser. In our structure Open Ldap student Academic Staff Active Dricetory Ldap have I want to combine these two applications. So how do we do it with MultipleLdapAppUser.

from identityserver4.ldapextension.

Nordes avatar Nordes commented on July 20, 2024

If you want to do it, you need to write your own custom IAppUser implementation. See the code for ActiveDirectoryAppUser.cs

The file ActiveDirectoryLdapAttributes.cs is a way to get the attributes from AD with the AD well known attributes. The same goes for the OpenLdap (if the proper setup is done on the OpenLdap Server).

When you will be merging ActiveDirectory and OpenLdap users attributes, you will have to know from where they come from before in order to fill your user information properly. As said in the #10 , you have specific fields that you know exists on one system and not the other. For that, I would recommend you to re-validate using the username in your CustomAppUser: IAppUser.

Normally, you should be able to inject the multi-configurations of ldap and redo a validation using the Regex expression (multiple ldap config).

Example (pseudo code):

public class MyCustomSuffLdapAppUser: IAppUser{
        public MyCustomSuffLdapAppUser(ExtensionConfig config)
        {
            _config = config;
        }
       public void FillClaims(LdapEntry user){
         /// later in a different method
         config.Connections.ToList().FirstOrDefault(f=> f.IsConcerned(Username)); // Give if the first connection that concern the user
         // ... your own custom code here in order to map your attributes
        // Note that there's a new property added for each configuration and it's the friendlyName.
        // Use that in a switch statement and if you have an enum to even be sure it's easy to track everywhere? (maybe), then please do that.
       // Your claims are mapped! Yay, thank you, please see the existing code. It should be feasible
      }
 
      // ...
}

from identityserver4.ldapextension.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.