4 Replies Latest reply: Feb 25, 2013 11:31 AM by Sun-E RSS

    OAM and OID

    Sun-E
      Hi,

      I have a requirement to access OID via OAM custom plugin.

      We have custom attributes for users held within our ldap i.e. username, email, companyName.

      So for example when users are logging in the custom plugin will check OID to see if companyName is null if so then login fails else success.

      Is this feasible if so how?




      Thanks
        • 1. Re: OAM and OID
          Sun-E
          The oracle.security.idm.UserProfile; has specific attributes but how can we access our own custom attrs?
          • 2. Re: OAM and OID
            989706
            Hi,

            This should be possible.
            You get access to all user properties using the getAllUserProperties() API of oracle.security.idm.UserProfile.
            Refer below link.
            http://docs.oracle.com/cd/E12839_01/doc.1111/e14658/oracle/security/idm/UserProfile.html#getAllUserProperties__

            You need to iterate over the output of the above API and check for your attribute being not null.

            Hope this helps.

            Regards,
            Vishnu Mahajan
            • 3. Re: OAM and OID
              Sun-E
              Vishnu,

              thanks for that....I have tried to iterate this but only get a few attributes back...


                             userProfile = user.getUserObject().getUserProfile();
                             Iterator ps = (Iterator)userProfile;
                             //Iterator itr = ps.getAll();
                                  while(ps.hasNext())
                                  {
                                  Property prp = (Property) ps.next();
                                  LOGGER.logp(Level.FINER, "UserIdentificationPlugIn", "process",
                                  "The properties in OID " + prp.getName());
                                  }

              Returns

              The properties in OID NAME
              The properties in OID FIRST_NAME
              The properties in OID USER_ID
              The properties in OID USER_NAME
              The properties in OID PASSWORD
              The properties in OID LAST_NAME

              Not sure why other attitributes are not getting returned?
              • 4. Re: OAM and OID
                Sun-E
                I have tried both getAllUserProperties() and getUserProfile() and both return the same set of attributes.