June 10, 2016 at 12:58 pm #11194
I would like to keep up to date user’s data in the default data store of OpenAM with for example facebook. I could not see any related info in the documentation so I suppose I need to write a custom java class for that.
My goal is after user logged in via XUI login page and if user data in OpenDJ is older than x days then they needs to be synchronized with user’s facebook, google, etc. profile.
My guess is I need to create a new Post Authentication Plugin and implement the onLoginSuccess() method.
If I am correct then I need to write code which downloads user info from facebook and overwrites data in OpenDJ with the new values from facebook.
I have found this doc: Designing Your Post Authentication Plugin
Is that the proper and suggested way to keep sync user data with his/her social profile?
Thx.June 10, 2016 at 3:24 pm #11202Scott HegerParticipant
Since OpenAM is not an Identity Management product, you would have to create your own java class for this. A better place to handle this might be in the Attribute Mapper class of your OAuth 2.0 / OpenID Connect authentication module.June 16, 2016 at 10:54 pm #11341
Thank you for your help. Could you please confirm that you are talking about
Realm > Authentication > Modules > FacebookSocialAuthentication Module Name > ‘Attribute Mapper’ property?
If i am on the right track then I need to implement the org.forgerock.openam.authentication.modules.common.mapping.AttributeMapper interface.
Example implementation: org.forgerock.openam.authentication.modules.common.mapping.JsonAttributeMapperJune 16, 2016 at 11:13 pm #11342
Could you tell me which jar contains this interface? I can not find it in the ‘ClientSDK-13.0.0.jar’.June 17, 2016 at 9:15 am #11348Peter MajorModerator
* Go to https://stash.forgerock.org/projects/OPENAM/repos/openam/browse
* Press f
* Enter AttributeMapper
* select the right file
* find the src folder in the directory path and click on its parent directory
* open pom.xml
And then have a look at the groupId and artifactId elements.June 20, 2016 at 9:29 pm #11414
Thank you for the reply.
Just one more comment. Used maven repo:
<repositories> <repository> <id>forgerock</id> <url>http://maven.forgerock.org/repo/releases</url> </repository> </repositories>
You must be logged in to reply to this topic.