Search for users by Forgerock ClientSDK tools

Tagged: 

This topic has 5 replies, 4 voices, and was last updated 4 years ago by Dusty.

  • Author
    Posts
  • #4143
     k.satou
    Participant

    Hi,All.

    I have two questions.
    One, What’s AMIdentityRepository.searchIdentities of the filter argument’s format?. I want to search for the users using ClientSDK tools of Forgerock OpenAM-12.0.0 by sunIdentityServerPPCommonNameSN.
    Two, about ClientSDK vs REST API. Which or Why you recommend this?

    Please give me your help. Regard.

    #4145
     Victor Ake
    Participant

    Hello,
    The documentation for AMIdentityRepository is here:
    http://openam.forgerock.org/apidocs/com/sun/identity/idm/AMIdentityRepository.html

    And on your second question, it would be better and probably easier to use the REST APIs than the SDK. The development lately has been focused on the REST API.

    Regards,

    #4146
     k.satou
    Participant

    Thank you Victor.
    I read the documentation. However, I don’t understand AMIdentityRepository.searchIdentities of the pattern’s format.
    The documentation writes “pattern – Pattern to be used when searching.”
    Can I use regular expression in “pattern”?
    eg.
    // I want to search for the users by sunIdentityServerPPCommonNameSN;
    String filter = “sunIdentityServerPPCommonNameSN=A*”;
    IdSearchResults isr = amIr.searchIdentities(IdType.USER,
    filter, new IdSearchControl());

    Regards,

    #4169
     Peter Major
    Moderator

    Pattern is not a regexp, no. At best you can use *. Instead I think you should take a look at the IdSearchControl, and make sure you call setSearchModifiers on it (whilst using just a plain “*” for the pattern).

    #4178
     k.satou
    Participant

    Thank you Peter.
    I’m going to use IdSearchControl!

    #23848
     Dusty
    Participant

    Hi,

    A little bit late, but I landed on this forum topic via Google. Maybe this can be useful for other people. The pattern is used for the uid. Access logs from OpenDJ

    Pattern ‘*’ : uid=*
    Pattern ‘cn=dusty’ : uid=cn=dusty

    Regards

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

©2022 ForgeRock - we provide an identity and access platform to secure every online relationship for the enterprise market, educational sector and even entire countries. Click to view our privacy policy and terms of use.

Log in with your credentials

Forgot your details?