Update user's account in default data store after social login

This topic has 5 replies, 3 voices, and was last updated 5 years, 5 months ago by soma.

  • Author
    Posts
  • #11194
     soma
    Participant

    Hi,

    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.

    #11202
     Scott Heger
    Participant

    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.

    #11341
     soma
    Participant

    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.JsonAttributeMapper

    #11342
     soma
    Participant

    Could you tell me which jar contains this interface? I can not find it in the ‘ClientSDK-13.0.0.jar’.

    #11348
     Peter Major
    Moderator

    * 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.

    #11414
     soma
    Participant

    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>
    
Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

©2021 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?