May 12, 2015 at 2:18 pm #4143
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.May 12, 2015 at 2:35 pm #4145Victor AkeParticipant
The documentation for AMIdentityRepository is here:
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,May 12, 2015 at 2:47 pm #4146
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”?
// I want to search for the users by sunIdentityServerPPCommonNameSN;
String filter = “sunIdentityServerPPCommonNameSN=A*”;
IdSearchResults isr = amIr.searchIdentities(IdType.USER,
filter, new IdSearchControl());
Regards,May 15, 2015 at 8:27 am #4169Peter MajorModerator
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).May 17, 2015 at 5:09 pm #4178
Thank you Peter.
I’m going to use IdSearchControl!November 14, 2018 at 8:33 pm #23848DustyParticipant
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 ‘*’ :
Pattern ‘cn=dusty’ :
You must be logged in to reply to this topic.