Drupal

Migrating from v2 to v3

Differences between v2 and v3

v2 v3
Screens Files .ZIP upload not supported.
Requires upload of individual files or manual creation of folder and file copy procedure.
New Format
Single .ZIP file to upload, supports multiple .ZIP files.
Example Example configuration installed without uninstall option. Example configuration is optional to install and enable.
Data Mapping Custom UI Uses Drupal Rules.
Information Tab None Includes an Information tab on the Janrain Configuration Page that provides the site installer and builder access to Janrain configuration information to assist with troubleshooting.
Janrain Social Share v2 (as of October 2014) v3
Upgrades No v1 upgrade to v2 available. Upgrade from v2.13 to v3 requires:
- Configuration changes (rules for mapping, screens file).
- A SQL script.

Should I Upgrade or Do a New Install?

For sites that have user profiles connected with comments and other user-generated content we recommend taking a few steps to make sure the data is all properly tied together upon upgrade from v2 to v3. To help you do this, we have provided a SQL script (below) that you can ask your DBA to run on your Drupal database.

If log-in is used purely as a gateway to additional content and is not tied to user-created posts, comments, pages, or other content, it is possible to simply uninstall v2 and install v3. All user data resides safely on Janrain’s servers and will update on the Drupal site as soon as the user logs in again.

Note: The connection between the user and the user’s content is stored in the Drupal database and not in Registration. Content can be anything in Drupal that may be associated with a user (depending on how the Drupal site is set up).

For sites that configure data mapping, the logic must be recreated using our new integration with Drupal Rules.

Upgrading from v2 to v3

With v3 of the Janrain module we combined the Social Login (Engage) and Registration (Capture) modules into a single, more efficient module (with submodules that can be enabled to add functionality as desired). The processes of upgrading from either v2 module are similar as a result of our continued use of the authmap table in the database to map the authentication.

To upgrade from v2 to v3:

  1. Run the SQL migration script that matches your module (either Engage or Capture):

    SQL script for upgrading from Janrain Registration (Capture):

    UPDATE authmap
    SET module="janrain"
    WHERE module="janrain_capture";
    

    SQL script for upgrading from Janrain Social Login (Engage):

    UPDATE authmap
    SET module="janrain"
    WHERE module="janrain_engage";
    
  2. Disable, uninstall, and delete the v2 module(s).

  3. Download, enable, and configure the v3 module to use the same app.

    1. Rewrite any data mappings as Drupal Rules.
    2. Obtain a new screens package from your Janrain representative.

Prerequisites

  • Standard flow – The v3 module supports the standard Janrain flow by default.
  • If installing Social Login:
    • API key (secret)
  • If installing Social Login plus Registration:
    • The Janrain module retrieves many of its settings from Registration settings (to avoid asking the customer to enter lots of configuration settings that Janrain should know); therefore, these Registration settings will be created for you by Janrain:
      • plex_app_id – Registration setting (required for the Drupal v3 module). The plex_app_id is simply the Capture app ID placed in a location where the module can retrieve it programmatically (there is no way to request a Capture app ID through the current API).
      • plex_sso_server – SSO setting to make SSO discoverable (if you plan to use SSO). Note: We grab everything we can via API calls, but the SSO server can be cnamed and is not always discoverable. As a result, it needs to be set on the Dashboard.
  • Registration (Capture) application URL (for example, https://plex-qa.janraincapture.com)
  • Client ID
  • Client secret
    • We recommend using the login client or potentially making a Drupal-specific client. We do not recommend using the admin client.
  • Drupal screens file
    • The v3 module requires a single .ZIP file containing Janrain assets. This file is different from the one used by Drupal v2.x modules.
    • Janrain provides this file; our scripts generate the plex assets from your configuration.

Installation

The Janrain module is the main (core) module, and consists of a number of submodules. A module (including the main module) must be enabled to implement its functionality.

Each module you enable adds another layer of Janrain functionality (Social Login, Registration, and so on) to the Drupal site.

The following sections describes all of the v3 modules and submodules.

Janrain

module Required

The main (core) Janrain services module that must be enabled to implement the integration.

Enabling Janrain core makes certain hooks available to expert programmers who want to write their own implementation of Janrain services.

Janrain Admin UI

submodule

Turns on the Janrain administrative UI tabs. This could be disabled in the case where a customer does not want Drupal administrators to change the configuration.

Enabling Admin UI creates a page where you can configure your Janrain Social Login and/or Registration implementations.

Janrain Data

submodule

Enabling Janrain Data creates mapping between Janrain customer profile data and Drupal fields.

Janrain Example

submodule

Includes a reference implementation of Janrain services on a Drupal site (that is, it implements all the other modules on the Drupal site).

Janrain Example implements fully-functional versions of Janrain core, Janrain User Interface, and Janrain Data on a Drupal site. We encourage you to copy and customize this submodule to meet your needs.

The Example submodule activates Drupal users who are already linked to Registration accounts, so that a user logged in to a Registration account will also be logged in to Drupal. (Specifically, users logged in via Janrain are marked in Drupal as “active”.) The user’s status is permanently switched as soon as the blocked user logs in. This functionality is included to ensure a smoother demo and user experience.

When the Example submodule is disabled or not in use, Janrain honors Drupal bans (but does not record them in Registration).

Janrain Social Sharing

submodule

Integrates Janrain Social Sharing on a Drupal site.

Enabling Janrain Social Sharing creates a field that can be placed anywhere that a Drupal field is allowed. The field displays the Janrain Social Sharing widget and allows users to share the page on which the field is located.

Janrain User Interface

submodule

Enables the management of Janrain user interfaces (widgets) for placement on the Drupal site.

Enabling Janrain User Interface creates blocks that can be placed in Drupal structures that display the various components of Social Login and Registration.

Install the Janrain Module

For more information, see Installing modules (Drupal 7) in Drupal’s online help.

  1. Install and enable the Janrain v3 module from https://www.drupal.org/project/janrain. Answer yes to enable dependent modules.

    Enable Janrain v3 Dependent Modules
  2. Configuration > People > Account Settings If this is a new site, configure the user registration parameters.

    Configuration > People > Account Settings

    Janrain core doesn’t have configuration methods, so after enabling it, we recommend enabling Janrain Admin UI, which allows you to configure Janrain core.

    To prevent users with more limited permissions from changing the configuration, disable the Janrain Admin UI. The configuration will remain but the forms to change the configuration will be removed until Janrain Admin UI is enabled again.

    When the Janrain module is in Social Login-only mode, the module doesn’t change the Configuration > People > Account settings; it honors them (admins beware!). However, when the Janrain module is in Registration mode, it forces the Who can register accounts? setting to Administrators Only since Registration should own registrations.

    The Drupal Require email verification when a visitor creates an account setting is just something we honor. Drupal accounts won’t be created if this setting is active, and we don’t have verified emails on Social Login or Registration profiles.

    This is also why it is best practice to make emails required, unique, and verified. But you are allowed to operate in the completely unsecured mode of unverified emails.

The Log-in Escape Hatch

If you set up an admin account that is not connected to a Janrain user account, you may not be able to log in through the account provided by Janrain. If there is a problem with your configuration that affects Janrain registration and/or sign-in, you can use this URL to gain access to Drupal: http://sitedomain/user/login.

If you are using localhost and you cannot log in to the admin account via this URL, make sure your base URL is set correctly in your /sites/default/settings.php file.

Switching between Social Login and Social Login + Registration Configurations

When switching between Social Login and Social Login + Registration modes, remember to flush the caches (in Configuration > Development > Performance, click Clear all caches).

Steps for Social Login

Configure the Janrain Module

  1. Configuration > People > Janrain

    Configuration > People > Janrain
  2. Select Social Login as the product type.

    Select Social Login as the Product Type
  3. Enter your API key from the Janrain Engage dashboard for the app you wish to use.

    Enter your API Key
  4. The settings information will appear on the Information tab after configuration has been saved:

    Settings Information

Configure Profile Data Mapping from Janrain to Drupal

Enable the Janrain Data submodule.

Engage paths take the form of $.profile.identifier or $.merged_poco.identifier

  • $.profile.gender
  • $.merged_poco.gender
  • $.profile.name.givenName

For Facebook IDs, use $.profiles[?(@.name=="facebook")].identifier

Use the Provider Guide to determine which attributes are returned by which provider.

Steps for Social Login + Registration

Configure the Janrain Module

  1. Configuration > People > Janrain

    Configuration > People > Janrain
  2. Select Social Login + Registration as the product type.

    Select Social Login + Registration as the Product Type
  3. Enter your Registration app URL, Client ID, and Client secret.

  4. Upload the .ZIP file.

    Upload the .ZIP file

    After you upload the .ZIP file, the Manage section expands.

    The Manage Section Expands
  5. The settings information will appear on the Information tab after the configuration has been saved:

    Settings Information Appears on the Information Tab

Configure Profile Data Mapping from Janrain to Drupal

Capture paths take the form of $.uuid.

  1. Enable the Janrain Data submodule.

  2. In Modules, enable Rules UI Module.

  3. Configuration > Workflow > Rules > Add new rule

    Configuration > Workflow > Rules > Add New Rule
  4. Enter a Name for the Rule.

  5. For React on event, select Janrain customer information updated.

    Select Janrain Customer Information Updated
  6. Click Save.

  7. Select Add Action.

    Select Add Action
  8. Select Store Janrain customer information.

    Select Store Janrain Customer Information
  9. In the Value field, add a variable such as $.uuid.

  10. Expand the Data selector and find a selector such as site:current-user:name.

    Find a Selector
  11. Click Save.

Add Janrain Sharing to the Site

  1. Enable the Sharing submodule.

  2. Structure > Content Types

    Structure > Content Types
  3. Edit the Basic Page content type.

    Edit the Basic Page Content Type
  4. Click Manage Fields.

    Click Manage Fields
  5. Add a new field and widget: Janrain Share.

  6. Social sharing can only be added to pages. Add a new basic page to the site (Content > Add Content > Basic Page) and sharing will be displayed on that page.

Add the Janrain Social Login Block to the Site

  1. Enable the Janrain Admin UI submodule.

  2. Select Administration > Structure > Blocks.

    Select Administration > Structure > Blocks
  3. Identify the location for the new block.

    Identify the Location for the New Block

    Adding the Social Login block to the Help section creates this layout:

    Adding the Social Login Block to the Help Section Creates this Layout

TEST CASE–Display Message based on Janrain/Drupal Value

  1. Ensure the Rules UI module is enabled.

  2. Configuration > Workflow > Rules > Active Rules.

  3. Select your Rule.

    Select your Rule
  4. Select Add Action.

    Select Add Action
  5. Select Add a variable and click Continue.

    Select Add a Variable and Click Continue
  6. For Value, select Text.

    For Value, Select Text
  7. Click Continue.

  8. Modify the default variable name.

    Modify the Default Variable Name
  9. Select Save.

  10. Select Add Action.

    Select Add Action
  11. Select Show Message on Site.

  12. Place the variable in the Message.

    Place the Variable in the Message
  13. Click Save.

  14. Select Configuration > Performance > Clear all caches.

Implementations

One Site (Mom and Pop)

Follow the Installation instructions to implement Janrain services on one site.

Multiple Sites (Consistent, Reliable, Repeatable Service)

To implement Janrain services across multiple sites, you can create a Drupal submodule based on the Janrain Example submodule and install this customized module on all your Drupal sites.

The Example submodule:

  • Creates pages, Rules, and fields.
  • Replaces Drupal’s login/registration with the Janrain UI blocks (except /user/login/).
  • When the Janrain module is configured for Social Login only instead of Social Login and Registration, the Example submodule adds the Social Login widget to /user/login.
  • Configures pages to be used for password recovery and email verification.

The Example submodule contains the following files:

janrain_example.info

In addition to describing the submodule and setting dependencies, this file contains the initial field_base calls for the fields that the Rules will populate.

( features[field_base] [ ] = field_birthday )

janrain_example.install

Handles user/login issues using menu_link_maintain. Uses janrain_example_node_create() to create pages for password recovery and email verification. Note that text for those pages is created here as well as the path, which in the example includes the word “janrain” to prevent duplication.

janrain_example.module

Overrides Drupal login/registration/logout. Checks to see if the settings for password recovery and email verification on the Janrain Dashboard match the ones created in the example.

janrain_example.rules_defaults.inc

Creates some example Rules using Drupal and Janrain SDK tools.

janrain_example.features.field_base.inc

janrain_example.features.field_instance.inc

Defines the fields into which the Rules map.

login.php

Adds Social Login to sign-in/sign-up pages. Maps incoming pictures onto user data.

registration.php

  • Creates the tab for editing a Janrain profile on user pages.
  • Handles log-in.
  • Places or hides blocks according to the signed-in state.
  • More password recovery and email verification node setup.

Before creating your own submodule based on the Janrain Example, read through all the code as many tasks are accomplished through actions in multiple files.

To create your own submodule, copy the Example into a different folder of the Janrain module folder and give it a unique name. For example, instead of “Example” it could be “Bluesites” and the .info file might have the name “Janrain Bluesites”.

This is a task best suited for someone who has written modules before. The commenting is clear and it should be possible to make a solid submodule based on the given examples. Adding Rules involving numbers may mean adding dependencies on Drupal modules that support certain number types.

Always work in a development environment first, and happy coding!

Advanced Module Builds (for Drupal Programmers)

If you have Drupal programming expertise on your staff, you can use the Janrain core module in standalone mode (that is, use the core module itself, without enabling any of the submodules) with the Janrain-provided hooks and function calls.

To use the Janrain core module in standalone mode, you need to configure your Registration widget to have an event handler that posts the response code to the Drupal service endpoint and “primes” the log-in. When you’re ready to actually log in, submit a login form to the regular Drupal login endpoint and the module will take care of Drupal account creation, linking, or log-in.

If you want to hook into data events without the Rule module, your module should implement a hook_janrain_profile_received() handler which will receive a reference to a Janrain::Profile object. This object has some convenience methods for working with the Profile:

  • toString(), which returns the profile as a JSON blob.
  • get($jsonPathQuery), which pulls values based on the given JsonPath string.
  • getIdentifiers(), which grabs a Capture UUID and any social identifiers from IDPs.

Acquia Lift

Overview

The Janrain integration with Acquia lift enables Acquia Cloud customers who use Acquia Lift to personalize Drupal site content based on Janrain customer profile attributes.

Customer profile data stored within Janrain Registration can be transferred to Drupal using the Janrain Drupal module. Once mapped and available in Drupal user records, customer profile data can be accessed by Acquia Lift for content personalization.

This integration requires:

  • A deployed Janrain Registration solution
  • A Drupal site with required modules
  • An active Acquia Lift account
  • A deployed Janrain Drupal module

The following example walks you through personalizing content on a Drupal site hosted on Acquia Cloud using Janrain Registration and Acquia Lift.

The Janrain Drupal module supports mapping Janrain customer profile fields to Drupal user fields. Acquia Lift can personalize site content based on user context. This integration blueprint demonstrates how to use Acquia Lift to personalize site content based on a gender value that is transferred from Janrain to Drupal.

Prerequisites

  • A configured and deployed Janrain Registration solution
  • A configured and deployed Janrain Drupal module integration
  • An Acquia Cloud-hosted Drupal site
  • Acquia Lift

Janrain Drupal Module Configuration Instructions

  1. To create a field in Drupal to store the personalization attribute, start at Configuration and click Account Settings.

  2. Click Manage Fields.

    Click Manage Fields

  3. Add the field that will hold the personalization attribute.

    Add Personalization Attribute Field

  4. Click Configuration.

    Click Configuration

  5. Click Janrain Capture.

    Click Janrain Capture

  6. Click Field Mapping and map the Capture field to the newly-created Drupal field.

    Map the Capture Field to the Newly-created Drupal Field

  7. Click Save Configuration.

Acquia Lift and Drupal Configuration Instructions

  1. Click Acquia Lift.

    Click Acquia Lift

  2. Click the campaign listing page link.

    Click the Campaign Listing Page Link

  3. Click Add Personalization Campaign.

    Click Add Personalization Campaign

  4. Enter a campaign name and select personalize-target as the type.

    Enter a Campaign Name

  5. Click Save campaign settings.

  6. Click on the name of the campaign to reveal the available visitor contexts.

    Reveal the Available Visitor Contexts

  7. Click Choose a context… and select the context to be used for personalization.

    Select Personalization Context

  8. Click Save campaign settings.

    Click Save Campaign Settings

Configuring Acquia Lift

  1. Log in to your Acquia Cloud Drupal site with administrator privileges.

  2. Navigate to the page that will host the Lift personalized content. Click Customize this page.

    Click Customize this Page

  3. In the page section that will include the Lift personalized content, click the + icon.

    Click '+' Icon

  4. In the Widgets section, click Add text.

    Click Add Text

  5. Select the campaign to be used for personalization.

    Select Personalization Campaign

  6. In the General Settings section, enter a Title.

    Enter a Title

  7. Enter the default text to be shown in the personalization block and click +Add an option.

    Enter Personalization Block Default Text

  8. Add the first content variation.

    Add First Content Variation

  9. Add the second content variation.

    Add Second Content Variation

  10. Click Save. The block is displayed on your page.

    Block is Displayed on Your Page

  11. Click Save.

    Click Save

Configuring the Acquia Lift Campaign

  1. Return to your campaign and click the content variation set.

    Click the Content Variation Set

  2. You will see the set of variations that were created earlier. Click Show to visitors with specific traits.

    Click Show to Visitors with Specific Traits

  3. Select the variable you want to use for personalization.

    Select Personalization Variable

  4. Enter a value for the context variable.

    Enter a Value for the Context Variable

  5. Enter all values that will be used for personalization.

    Enter all Values to Be Used for Personalization

  6. Click Save variation sets.

    Click Save Variation Sets

  7. Click Start to start executing the campaign.

    Click Start to Start Executing the Campaign

Testing the Integration

  1. Accessing the web page when logged out will initially show the default text variation.

    Accessing Web Page when Logged Out Shows Default Text

  2. After signing in with a Janrain Capture account that has a gender attribute, the site will display one of the two content variations (depending on the gender attribute value).

    Site Displays One of Two Content Variations

WordPress

WordPress – Registration

Overview

The Janrain WordPress Registration plugin accelerates the time required to implement Janrain Registration into your WordPress sites. The plugin overrides the native WordPress registration and sign-in screens and syncs Janrain customer profile data with your local WordPress user storage.

The Janrain WordPress Registration plugin supports the following platform capabilities:

  • Social Login
  • Registration
  • Social Sharing v2
  • Single Sign-on
  • Backplane

Prerequisites

  • A working understanding of WordPress and WordPress terminology.
  • A Janrain Registration application.
  • WordPress screens files package provided by Janrain once Registration configurations are complete. Used to replace the default screens files that are shipped with the plugin.

Installation and Configuration

Install and activate the Janrain Registration WordPress plugin

  1. From the administrative menu, select Plugins > Add New and search for Janrain Registration, or download the WordPress Janrain Registration plugin from https://wordpress.org/plugins/janrain-capture and add it to your plugins folder.
  2. On the administrative menu, select Plugins to activate the plugin.

Copy Registration screen files to the correct location

The Capture (Registration) plugin comes with a set of default screens that you may use to begin working on your WordPress integration. Once Janrain has completed any configuration changes for your Registration flow, Janrain will give you a new set of screens to implement with the plugin.

  1. Copy the janrain-capture-screens folder from inside the janrain-capture plugin folder to the main plugins folder (from /wp-content/plugins/janrain-capture/janrain-capture-screens to /wp-content/plugins/janrain-capture-screens). If you do not complete this step, your integration may be broken if you later upgrade the plugin and overwrite your customized screen files.
  2. Replace the HTML, JavaScript, and CSS files in the /wp-content/plugins/janrain-capture-screens folder with the WordPress screens files provided by Janrain. These new files reflect the latest updates to server-side functionality.
  3. Delete the janrain-mobile.css file in the /wp-content/plugins/janrain-capture-screens/stylesheets folder. This file is provided for legacy versions (you do not need it for the current releases).

Note: The screen files provided for use with WordPress are formatted differently than the standard screen files that Janrain hosts at your reference implementation (provided by Janrain). The Capture plugin generates many of the settings that are required for Janrain Registration and looks for screens in specific file locations, so the Javascript and HTML components of Registration are broken up into multiple files as opposed to being available in a single file.

Add the Janrain profile page to a WordPress site

  1. Select Pages > Add New.
  2. Place the [janrain_capture action="edit_profile"] short code on the page.
  3. Publish the page and note the permalink. You will need this in step 4.

Configure required plugin settings

a. Configure the Capture version and the Engage application URL in WordPress

On Janrain Capture > Janrain Capture Settings, configure the following settings:

  1. Select Capture from the UI Type menu (Capture Legacy has been deprecated).
  2. In the Engage Application Url box, enter your Janrain Social Login application domain. Note that you must configure any social providers that you wish to use in the Janrain Dashboard.
  3. Click Save Changes.
b. Configure Capture application settings

On Janrain Capture > Capture Settings, configure the following settings:

  • Application URL – Your Janrain Registration application domain.
  • Application ID – Your Janrain Registration application ID from the Janrain Dashboard.
  • API Client ID – An API client ID from the Janrain Dashboard. Always use a client with the login_client feature. See API Clients and Permissions for more information.
  • API Client Secret – The client secret for the previously-entered API client.
  • Packages – Select capture and login.
c. Configure load file and screens folder locations

On Janrain Capture > Interface Settings, configure the following settings:

  • URL for load.js file – Use the appropriate option below for your site’s protocol and replace <Engage App> with the name of your Social Login application. Refer to your Capture Dashboard settings for the rpx_realm or rpx_custom_realm setting.
    • http://widget-cdn.rpxnow.com/load/<Engage App>
    • https://rpxnow.com/load/<Engage App>
  • Edit Profile Page – Enter the permalink (Profile Page URL) created in step 3.
  • Screens Folder – Ensure that the screens folder matches the location where you placed the screen files in step 2.
  • If you have modified the name of any of your screen files, modify the default file names on this tab to match.

To add a Janrain log-in link to the WordPress site, use the [janrain_capture] short code. Place the [janrain_capture] short code on any WordPress page (except the Edit Profile page as set in Interface Settings) and a Janrain Sign In / Register link will be rendered.

Configure forgot password and verify email URLs in the Janrain Dashboard

In the Janrain Registration Dashboard you need to configure the URLs for the forgot password and email verification emails that Registration provides. The WordPress plugin requires these to be formatted differently than in a standard site integration. Configure the following settings for any API clients that you are using with the WordPress plugin with the format shown below, replacing <yoursite.com> with your site’s domain. See API Client Settings for more information.

  • password_recover_url: http://<yoursite.com>/reset/?url_type=forgot
  • verify_email_url: http://<yoursite.com>/verify/?url_type=verify

Configure optional plugin settings

a. Configure Federate (Single Sign-on) settings

The Janrain WordPress plugin will generate all JavaScript settings and pages required to enable Single Sign-on (SSO). See Registration Single Sign-on for more information on how SSO works.

On Janrain Capture > Capture Settings, configure the following settings:

  • Enable SSO – Enable Single Sign-on functionality for the WordPress site.
  • Application Domain – The Janrain Federate SSO domain provided by Janrain.
  • Cross-domain receiver page – The URL of your Federate cross-domain receiver page.
  • Federate logout page – The URL of your Federate logout page.
b. Configure Backplane settings

The Janrain WordPress plugin will generate all JavaScript settings required to enable Backplane.

On Janrain Capture > Capture Settings, configure the following settings:

  • Enable Backplane – Enable Backplane for the WordPress site.
  • Server Base URL – The base URL of your Backplane server (provided by Janrain).
  • Bus Name – The Backplane bus name (provided by Janrain).
  • Backplane Version – Always choose Backplane version 1.2.
c. Configure data mapping

On Janrain Capture > Data Mapping, enter the Janrain Registration (Capture) field names corresponding to standard WordPress fields. This enables mapping Janrain customer profile data to WordPress.

d. Add Social Share v2 to a WordPress site

To enable Social Sharing v2 on a WordPress site, you need to enable sharing in the plugin admin and place the sharing short code onto pages where you want to display the Janrain Social Sharing v2 UI.

On Janrain Capture > Janrain Capture Settings, configure the following settings:

  • Enable Social Sharing – Enable Sharing for the WordPress site.
  • Share Providers to Display – Select which share providers to display. You must configure any selected providers in your Janrain Social Login Dashboard.

Use the following short code to enable the Social Sharing UI on your WordPress site:

[janrain_share title="Janrain Engage Share Widget" description="Instructions for how to configure the Janrain Engage Share Widget" url="wordpress.org/extend/plugins/janrain-capture/" text="Tell a friend"]

Troubleshooting

  • Ensure the Janrain screens files are in the correct folder (as indicated in Interface Settings).
  • Ensure the flow referenced in the local screens files matches the flow that has been deployed for your Janrain Registration account (usually standard). Your Janrain representative can validate this for you.
  • Check that the Engage, Capture, and load.js file URLs are correct. Your Janrain representative can validate this for you.
  • Check that the password_recover_url and verify_email_url settings are formatted correctly.

WordPress – Social Login

Overview

The Janrain Social Login plugin for WordPress enables integration of Janrain Social Login features on your WordPress site. This plugin requires a Janrain Social Login account.

This topic describes the installation of the Social Login integration. If you are using Janrain Registration, refer to WordPress –- Registration.

Note: The Janrain Social Login plugin for WordPress was previously referred to as RPX or Engage. Those legacy terms may still appear in the WordPress module UI.

Installation

Requires PHP 5.3 and WordPress 3.5 or higher.

  1. Download the Janrain Social Login plugin from wordpress.org.
  2. Unzip the file and copy the rpx directory and its contents to your /wp-content/plugins/ directory (or use the plugin installer built into WordPress).
  3. Use the WordPress Plugins menu to activate the Janrain Social Login plugin.
  4. Enable user registrations:

    1. Navigate to Settings > General.
    2. Select the Membership, Anyone can register box.
    3. Click Save at the bottom of the page.
  5. Go to the Janrain Engage configuration page by selecting Janrain Engage from the navigation menu. Follow the instructions on the page to complete your installation.

    • If you don’t already have a Social Login account and API key, go here to sign up.
    • If you have already created an account and site for your WordPress blog, enter your API key into the box and click Save.
  6. Once you enter the API key, configuration options are displayed. If you have not yet configured your Janrain Social Login solution, detailed instructions are available here.

  7. Due to the email address requirements in WordPress 3, users will be prompted for an email address if the identity provider does not supply one. If the chosen provider’s settings do not include email as a profile option, the plugin will require the user to enter an email address.

Common Questions and Issues

How do I enable Facebook, Twitter, Myspace, and Live ID authentication?

  1. Go to https://dashboard.janrain.com/signin and sign in.
  2. Click the Provider Configuration link on your application dashboard.
  3. Toggle between each provider on the right-side panel.
  4. Click the blue Configure button for instructions to enable each provider. All four of these providers require you to obtain an API key and secret for your individual site and accept the developer terms of service.

The plugin works, but authentication fails when the token is returned.

Using custom port numbers is one possible cause.

The plugin strips port numbers from URLs, and this behavior will cause an error when Janrain attempts to return a token to a URL (for example, localhost:1234). Either add the path to your host file to avoid using a port number or add the URL directly to the code.

To add the URL to the code:

  1. Open the rpx_v.php file in the wp-content/plugins/rpx directory.
  2. On line 407, replace the variable value in the janrain.settings.tokenURL function with the URL. Replace janrain.settings.tokenUrl = '<?php echo urldecode(rpx_get_token_url()); ?>'; with janrain.settings.tokenUrl = 'http://localhost:8888/sample-page';.

WordPress VIP – Registration

Overview

The Janrain WordPress VIP Registration plugin accelerates the time required to integrate Janrain Registration into your WordPress VIP sites.

Note: The VIP version of WordPress does not offer local user storage, unlike the open source WordPress version. User data is hosted by Janrain in the Cloud.

Prerequisites

  • A configured and deployed Registration solution
  • A deployed WordPress VIP site

Installation and Configuration

Install plugin

Contact your Automattic representative to add Janrain Registration to your site.

Configure required Janrain Registration settings

  1. Log in to your WordPress admin dashboard.
  2. Navigate to Janrain Capture > Janrain Capture.
  3. Configure the following settings:
    1. Application Url – Your Janrain Registration application domain.
    2. Application ID – Your Janrain Registration application ID from the Janrain Dashboard.
    3. API Client ID – An API client ID from the Janrain Dashboard. Always use a client with the login_client feature. See API Clients and Permissions for more information.
    4. API Client Secret – The client secret for the previously-entered API client.
    5. Packages – Select capture and login.
    6. Engage Application Url – Your Social Login application domain. This is available from your Janrain Dashboard (in your Social Login application, on the Settings page under the Application Info section). It is listed as the Application Domain.
  4. Skip the Federate Settings and Backplane Settings sections unless asked to do so by your Janrain representative (see step 7 for instructions).
  5. Click Save Changes.

Upload Registration screen files to the correct location

The Janrain Capture plugin comes with a set of default screens that you may use to begin working on your WordPress integration. Once Janrain has completed any configuration changes to your Registration flow, your Janrain representative will give you a new set of screens to implement with the plugin.

  1. Select Janrain Capture > UI Settings.
  2. Load Capture screens to the appropriate folder (as instructed on the UI Settings page).

You will return here in step 5 to complete the required settings on this page.

Note: If you are using a child theme, you may see a screens not found message, but you can ignore it. The plugin will find your files in the child theme.

Create pages for edit profile, password reset, and email verification

  1. Configure the Edit Profile page:

    1. Select Pages > Add New.
    2. Enter a title (for example, “Edit Profile”).
    3. Place the following WordPress short code on the page: [janrain_capture action="edit_profile"]
    4. Publish the page and note the permalink (you will need this in step 5). For example: http://<yoursite.com>/edit-profile
    5. Do not add the page to the WordPress navigation.
  2. Configure the Password Reset page:

    1. Select Pages > Add New.
    2. Enter a title (for example, “Password Reset”).
    3. Publish the page and note the permalink (you will need this in step 6). For example: http://<yoursite.com>/password-reset
    4. Do not add the page to the WordPress navigation.
  3. Configure the Email Verification page:

    1. Select Pages > Add New.
    2. Enter a title (for example, “Verify Email”).
    3. Publish the page and note the permalink (you will need this in step 6). For example: http://<yoursite.com>/verify-email
    4. Do not add the page to the WordPress navigation.

Configure required UI settings

  1. Navigate to Janrain Capture > UI Settings.
  2. Configure the Url for load.js file setting. Use the appropriate option below for your site’s protocol and replace <Engage App> with the name of your Social Login application. Refer to your Capture Dashboard settings for the rpx_realm or rpx_custom_realm setting.

    • http://widget-cdn.rpxnow.com/load/<Engage App>
    • https://rpxnow.com/load/<Engage App>
  3. Click Save Changes.

Configure forgot password and verify email URLs in the Janrain Dashboard

In the Janrain Registration Dashboard, you need to configure the URLs for the forgot password and email verification emails that Registration provides. The WordPress plugin requires these to be formatted differently than in a standard site integration.

Configure the following settings for any API clients that you are using with the WordPress plugin with the format shown below, replacing the beginning of the URL before the query parameters with the permalinks created in step 4. See API Client Settings for more information.

  • password_recover_url: http://<yoursite.com>/password-reset/?url_type=forgot
  • verify_email_url: http://<yoursite.com>/verify-email/?url_type=verify

Configure optional features

Social Sharing

Configure these settings to add buttons for sharing activities with users using social networks (or email):

  1. Navigate to Janrain Capture > UI Settings.
  2. Select the Enable Social Sharing box.
  3. Under Share Providers to Display, select the providers to be offered as share options to your users. Note: These must be configured in the Janrain Dashboard, and not all providers offer sharing as a feature.
  4. Click Save Changes.
Single Sign-on

For users also implementing Single Sign-on (SSO) to share authentication with other sites:

  1. Navigate to Janrain Capture > Janrain Capture.
  2. Select the Enable SSO box.
  3. Enter the SSO Application Domain provided by Janrain.
  4. Click Save Changes.

Note: The plugin will generate all required settings and pages. You can safely ignore any other Janrain developer documentation regarding SSO.

Backplane Protocol Support

For users adding Backplane support:

  1. Navigate to Janrain Capture > Janrain Capture.
  2. Click the Enable Backplane box.
  3. Enter the Server Base URL provided by Janrain (usually backplane1.janrainbackplane.com).
  4. Enter the Backplane Bus Name provided by Janrain.
  5. For Backplane Version, always select version 1.2.
  6. Click Save Changes.

Demandware

The Janrain Demandware LINK cartridge supports both Janrain Registration and Janrain Social Login. The cartridge accelerates integration of Registration or Social Login features into a Demandware storefront.

This blueprint offers an example of integrating Demandware with both Social Login and Registration solutions. When using with Registration, the Janrain UI replaces the native Demandware login and registration screens.

Prerequisites

  • A Janrain Social Login account – When using the Demandware integration for Social Login.
  • A Janrain Registration account – When using the Demandware integration for Social Login and Registration.

User Guide

A guide to Demandware integration is available in PDF format.

Implementation Steps

The following implementation steps are described in the Demandware Integration Guide.

The following Janrain integration tasks are included within the LINK cartridge:

  1. Extend the SitePreferences system object to include Janrain-specific attributes.
  2. Set the newly-created site preferences with Janrain-provided values.
  3. Extend the Profile system object to include an Identifier attribute.
  4. Implement JavaScript template includes in the site header and footer.
  5. Implement sign-in / registration links and includes in site header and account pages.
  6. Implement sharing includes on the necessary site pages.
  7. Modify form resource files.

Adobe Experience Manager (AEM / Adobe CQ)

Overview

This document is used to integrate the Janrain out-of-the-box widget into the AEM environment. At the end of the integration, the Janrain Registration system will be available in a drag-and-drop component with a minimum amount of configurability.

Target Audience

  • AEM developers

Glossary

AEM Janrain Component - The entire component for the Janrain Registration system. It contains different blocks to be placed on various parts of a website and an authoring interface.

Author - Refers to the person who is configuring a website. Not the AEM developer, but someone who is pulling components onto a page.

Flow File - A static JSON file that defined fields, field validations, forms, screens, and various other actions and computed values.

Janrain Templating Language (JTL) Tags - HTML input fields are rendered server-side by Janrain’s core services. The HTML has placeholders that define these fields, called JTL tags. The actual field and form definitions are kept in the flow file.

Before You Begin

Take some time to understand the basic Janrain components of the Registration system. Register and log in traditional and social test users to your Janrain Reference Widget. These topics will help you familiarize yourself with the Registration system:

Site Assumptions

This guide assumes that text, fields, and field validation will be the same across sites. The author will have the ability to place the Registration widget onto a page and configure a subset of endpoints.

Text Customization

More than half of the text associated with the registration widget is held on Janrain’s side and therefore can be customized. The remaining text is held in the markup itself. Therefore, the AEM component will not have access to modify it. Additional development around a find a replace framework such as Spring Framework will be needed.

Fields

Fields and field validation will be the same across all sites. A field that is required on site1 must also be required on site2. There may be a bit of flexibility that is covered in the Flow File section. Any deviation will require two AEM Janrain components.

Embedded vs Modal

All sites will either show the Janrain Registration system in modal screens with an embedded Edit Profile screen, or the all of the screens will be in embedded format. This configuration is set from within a static file that sites will share. If two sites need two different experiences, then this requires two different flow files.

Flow File

Field definitions come from Janrain’s server side in a static file (flow file). If two sites are sharing the same flow file (most common) all sites must share the same fields and field validations. For example, if site1 requires firstName, site2 must require this field as well. The AEM Janrain component may have some flexibility depending on whether a field is optional as well.

An example of this would be if a flow file is configured to collect firstName (required), lastName (required), email (required) and displayname (optional). The AEM Janrain component would make it mandatory to show firstName, lastName, and email, but may make it optional to show or hide displayName.

Integration Files

The Janrain Registration widget is comprised of HTML, JavaScript, and CSS files. The CSS file is a default style that should remain as-is. Any custom style should be cascaded after this file has loaded. The HTML file in the package holds all of the screens markup. By default they are all hidden with display:none. They are shown at various points of the user journey with either JavaScript by listening to Janrain JavaScript Events or it is built in to the action function in the flow file (see the information below). The package also contains two JavaScript files. One is used for debugging, while the other (janrain-init.js) is used to hold all of the JavaScript API settings. This is an important AEM component file for the author to be able to edit.

index.html

This file consists of the following components:

Head - References the JavaScript files. This section must be included on any page on which Janrain exists.

Navigation Links - In the body, the following links are defined:

  • Sign In / Sign Up
  • Edit Profile
  • Sign Out

By default, the first link is displayed and the other links are hidden. The opposite happens when the user logs in using JavaScript:

janrain.events.onCaptureLoginSuccess.addHandler(function(result){      
	janrain.capture.ui.modal.close();
   	document.getElementById("captureSignInLink").style.display  = 'none';
        	document.getElementById("captureSignOutLink").style.display = '';
        	document.getElementById("captureProfileLink").style.display = '';
}

Edit Profile - Most of the time the Edit Profile screen does not live on the home page, so this markup can be moved into another section in order to be integrated on another page.

The Rest - All the rest of the HTML is screen markup that is needed at various points of the user journey.

janrain-init.js

This file holds the Javascript API settings and events. This file should either be made available to edit, or it should be developed into a UI so that an author can change various settings. Here are the settings that need to be made available:

janrain.settings.appUrl                = 'https://{{ ENGAGE_DOMAIN }}';
janrain.settings.capture.captureServer = '{{ CAPTURE_SERVER_URL }}';
janrain.settings.capture.appId         = '{{ CAPTURE_APP_ID }}';
janrain.settings.capture.clientId      = '{{ CAPTURE_CLIENT_ID }}';
var httpLoadUrl  = "{{ LOAD_JS_URI }}";
var httpsLoadUrl = "{{ LOAD_JS_URI_SSL }}";
// --- Engage Widget Settings ----------------------------------------------
janrain.settings.language = '{{ LOCALE }}';
janrain.settings.tokenUrl = '{{ CAPTURE_TOKEN_URL }}';
// --- Capture Widget Settings ---------------------------------------------
janrain.settings.capture.redirectUri = '{{ CAPTURE_REDIRECT_URI }}';
janrain.settings.capture.flowName = '{{ FLOW_NAME }}';
janrain.settings.capture.flowVersion = '{{ FLOW_VERSION }}';
janrain.settings.capture.setProfileCookie = true;
janrain.settings.capture.keepProfileCookieAfterLogout = true;
janrain.settings.capture.responseType = 'token';
janrain.settings.capture.returnExperienceUserData = ['displayName'];
janrain.settings.capture.stylesheets = ['styles/janrain.css'];
// --- Federate ------------------------------------------------------------
//janrain.settings.capture.federate = true;
//janrain.settings.capture.federateServer = '';
/janrain.settings.capture.federateXdReceiver = '';
//janrain.settings.capture.federateLogoutUri = '';
//janrain.settings.capture.federateLogoutCallback = function() {};
//janrain.settings.capture.federateEnableSafari = false;
// --- Backplane -----------------------------------------------------------
//janrain.settings.capture.backplane = true;
//janrain.settings.capture.backplaneBusName = '';
//janrain.settings.capture.backplaneVersion = 2;
//janrain.settings.capture.backplaneBlock = 20;

Creating Janrain Components

The Janrain Registration widget must be broken up into the following sections:

  • Navigation links
  • Edit Profile screen
  • The rest of the screens

To learn more about developing custom components, refer to this page.

Components

Inside of the components folder create a new folder named Janrain. Inside of that, create four new components:

  • janrain-navigation
  • janrain-screens
  • janrain-editprofile
  • janrain-init

Each of these components will have an auto-generated JSP page. The corresponding HTML code can now be brought into each component.

The janrain-init component must have editable fields. This is accomplished by adding cq:editConfig above and below the needed lines. Read more about adding editing capability here.

Oracle Sales Cloud

Overview

Janrain’s integration with the Oracle Sales Cloud enables customer acquisition through an accelerated Registration conversion with Social Login, allowing you to capture rich customer profile data that can be gathered and stored and used to drive sales and marketing efforts.

The Janrain-Oracle Web connector application is a collection of web services that transfers information about new or updated customer profiles from the Janrain REST API to the Oracle Sales Cloud.

Sending Leads from Janrain to Oracle Sales Cloud

Prerequisites

Janrain Registration application

If you don’t have one already, contact Janrain for a Registration solution.

Note: A webhook from Janrain tied to this Registration solution will be needed, but not until a URL for your web application is obtained. Testing can be carried out without the webhook.

Web page containing a Janrain Registration widget

Any page containing your Registration widget will work. This is needed for webhook operation.

Oracle user account

A free account is needed to download JDeveloper. To create an account (or sign in), go to http://www.oracle.com/index.html and click Sign-in/Register.

JDeveloper 11.1.1.7.1

JDeveloper is a free, integrated development environment from Oracle. You can download JDeveloper 11.1.1.7.1 here.

Follow these instructions to install and configure JDeveloper.

Oracle Cloud instance

Register at https://cloud.oracle.com/home.

Oracle Fusion applications access

This came with your subscription and lets you see any leads you created.

Oracle Web Services URLs

Needed to create proxy clients to the Oracle Sales Cloud. The services needed are:

  • Location Service
  • Sales Party Service
  • Lead Service

These URLs point to WSDL documents and have the form:

https://<Your Account>.<crm.us2>.oraclecloud.com/crm<name>/<service>?WSDL.

Configuration Steps

JDeveloper installation

Oracle recommends installing JDeveloper on 64-bit Windows. We do not recommend installing JDeveloper on other operating systems. For instructions on installing and configuring JDeveloper, refer to Oracle’s JDeveloper Installation page.

Start JDeveloper and create a new application

  1. Start JDeveloper.
  2. In JDeveloper, click New Application.
  3. Name the application JanrainOracle or <Your Name> and Oracle.
  4. Select Fusion Web Application (ADF) as the application type and click OK.
  5. Two new projects are created named Model and ViewController.
  6. Add a new generic project to the application and name it LocationServiceProxy.
  7. Add a new generic project to the application and name it SalesPartyServiceProxy.
  8. Add a new generic project to the application and name it SalesLeadServiceProxy.

Add Oracle Web Service clients

There are three web proxy clients to be constructed, each using the JDeveloper wizard. Each proxy client is placed in a separate project. The code generated through the wizard must be amended to work in this application. Re-running the wizard afterward erases any amendments. What follows is applicable to all three clients, although we will use the Location Service in our example.

  1. Right-click on the project name (Location, SalesParty, or SalesLead) and select New.

  2. In the New Gallery dialog, select Business Tier > Web Services > Web Service Proxy, and click OK. The following screen is displayed:

    Web Service Proxy Wizard, Welcome Page

  3. Click Next.

    Web Service Proxy Wizard, Select a WSDL Document

  4. Enter the location of the WSDL file. See the following example:

    Web Service Proxy Wizard, Select a WSDL Document (file location entered)

  5. The actual URL is based on your cloud instance. Click Next.

  6. Enter com.oracle.pts for the Package Name and unselect the Generate as Async option.

    Web Service Proxy Wizard, Specify Default Mapping Options

  7. Click Next.

    Web Service Proxy Wizard, Port Endpoints

  8. Click Next.

    Web Service Proxy Wizard, Asynchronous Methods

  9. Select Don’t generate any asynchronous methods and click Next.

    Web Service Proxy Wizard, Policy

  10. Select oracle/wss_username_token_over_ssl_client_policy and leave the other options unselected. Click Next.

    Web Service Proxy Wizard, Defined Handlers

  11. Click Next. The final screen is displayed.

    Web Service Proxy Wizard, Finish

  12. Click Finish.

    Repeat this process for the remaining WSDL URLs. Many more files will appear in the Application Navigator.

Set certificate keystore path

In order for the REST API class method Send to work, a valid certificate for your target REST endpoint must be used.

  1. From the Main menu, select Tools > Preferences > HTTPAnalyzer > HTTPS Setup.
  2. For the field Client Trusted Certificate Keystore, click Browse.
  3. From the list, select cacerts.
  4. Click OK.

Modify the Oracle proxy service clients

Open the Connector.Jar file and extract the contents.

  • Replace the auto-generated LocationServiceSoapHttpPortClient.java file with the contents of LocationService.java from the JAR file.
  • Replace the auto-generated SalesLeadServiceSoapHttpPortClient.java file with the contents of SalesLeadService.java from the JAR file.
  • Replace the auto-generated SalesPartyServiceSoapHttpPortClient.java file with the contents of SalesPartyService.java from the JAR file.

Add Servlet class

  1. From the Main menu, select File > New > Web Tier > Servlets.
  2. Select HTTP Servlet, then click Next.
  3. Set the class name to Webhook.
  4. Set the Generate Content Type to HTML.
  5. Select both doGet and doPost, and click Next.
  6. Leave the mapping information alone and click Finish.
  7. Double-click Webhook java to view the contents.
  8. Replace the contents of Webhook.java with the contents of Webhook.java from the JAR file.

Add JSON parsing class

  1. From the Main menu, click on file /New/General/Java.
  2. Select Java Class, then click Next.
  3. Set the class name to JSONParse, then click OK.
  4. Replace the contents of JSONParse.java with the contents of JSONParse.java from the JAR file.
  5. Replace the existing webhook hash code(s) with hash codes from your webhook configuration and update the IF statement to match the number of codes. See Code Sample 1 for more information.
  6. If previously commented out for servlet test, remove comment tags from around the references to the JSONParse class in the Webhook class.

Add REST API calling class

  1. From the Main menu, click on the file /New/General/Java.
  2. Select Java Class and click Next.
  3. Set the class name to RESTApi and click OK.
  4. Replace the contents of RESTApi.java with the contents of RESTApi.java from the JAR file.
  5. Modify the Send method to reflect your actual capture endpoint URL, your client ID, and your client secret. See Code Sample 2 for more information.

Add Mapping class

  1. From the Main menu, click the file /New/General/Java.
  2. Select Java Class and click Next.
  3. Set the class name to Mapper and click OK.
  4. Replace the contents of Mapper.java with the contents of Mapper.java from the JAR file.

Deploying to Java Cloud Services (JCS)

Before deploying to an external server, deploy the individual projects of the application to their individual JAR or WAR file. LocationServiceProxy, SalesPartyServiceProxy, and SalesLeadServiceProxy all must be deployed as JAR files. Deploy ViewController as a WAR file.

There are two ways to deploy to JCS:

  • From within JDeveloper
  • From the Oracle Cloud console

Deploying from within JDeveloper

  1. Right-click on the application name and select Deploy. At this point, if there is a numbered option for a connector used for the Oracle Cloud, use it and you are done. If not, continue with the following steps to create one.
  2. Select the name of the application at the top of the list.
  3. On the next screen, select Deploy to Application Server.
  4. On the next page, make sure that the Overwrite box is selected (this will ensure the old code is deleted before the new code is added).
  5. Click ’+’ to add a new connection.
  6. Give the connection a name that explains its purpose.
  7. For the connection type, select Oracle Cloud.
  8. Supply the Username and Password you use to log in to Oracle Cloud.
  9. Select the Data Center and add the Identity Domain and Service Name. These values were sent to you, but if you need to find them, the Identity Domain is on the login page for Oracle Cloud, and the Service Name is located on the Oracle Cloud console as the Service Instance.
  10. If you see a connection failure, recheck your credentials. You may need to download the latest Oracle-JavaCloud SDK.

Testing

Once your application is successfully deployed to JCS, you can test it. A simple way to test is to use a cURL message (PHP or command-line).

An example of a command-line cURL post is:

curl < URL from JCS/webhook > \
 -d '{"client_id":"<Insert a real client id from your list of capture api clients>","datetime":"2014-09-09T21:48:51.257Z","entity_type":"user","hash":"<insert any hash code from web hook setup>","uuid":"a real uuid from your capture records"}' \
 -H 'Content-Type: application/json'

Get a Janrain webhook

Set up a Registration application webhook.

Code Samples

Code Sample 1

The following code sample is a section of the JSONParse class that needs to be customized to work for you. The parts to be customized are highlighted below.

You will need to know all of the hash codes that were set up in the webhook configuration file. These codes add a layer of confidence that the JSON post to the servlet is from Janrain.

private HashMap parseHook() {
  /*
  * This function parses a (potential) webhook message body and returns a
  * hash map of the parameters it finds. It does a short-circuit test looking for 'uuid'
  * in the message body first.
  * We are only interested in two values: uuid and hashCode
  */

  HashMap hmHook = new HashMap();
  String hook = this.incomingBody;
  String[] split;
  String uuid = "";
  String hashcode = "";
  String results = "";
  int found = -1;
  int last =0;

  //Below are the hash codes to compare against.
  //Add as many as are used in the config file.
  //For instance, if you specified five hash codes in your
  //webhook configuration, you would need to specify strings
  //hash1 through hash5. In the example below, we only
  //specified two.
  //It's possible to use these codes to direct the flow of code if desired (update vs. create).

  String hash1 = "xxxxxxxxxxxxxxxxxxxxxxxxxx"; // create new
  String hash2 = "xxxxxxxxxxxxxxxxxxxxxxxxxx"; // update
  .
  .
  .
  //Adds to the hash map ONLY if the hash code is a match to a code in the webhook config file.
  //Here again, add to the IF statement to include all of the hash codes used.

  if(hashcode.contains(hash2) || hashcode.contains(hash1)){
    .
    .
    .
  }
  return hmHook;
}

Code Sample 2

The following code sample is a section of the RESTApi class that needs to be customized to work for you. The parts to be customized are highlighted below.

You will need to know your Registration application name, the client ID code, and the client secret code.

public String sendPost() throws Exception {
  /*
  * This is Java code that makes a call to the REST API and receives the JSON reply.
  * It returns this reply string to JSONParse for further processing.
  */

  String url = "https://ENTERYOURCAPTUREAPPNAMEHERE.janraincapture.com/entity";
  URL obj = new URL(url);
  HttpsURLConnection con = new HttpsURLConnection(obj);

  //Add request header
  con.setRequestMethod("POST");
  con.setRequestProperty("User-Agent", USER_AGENT);
  con.setRequestProperty("Accept-Language", "en-US,en;q=0.5");
  String urlParameters = "type_name=user&";
  urlParameters += "client_secret= ENTERYOURCLIENTSECRETHERE";
  urlParameters += "&client_id=ENTERYOURCLIENTIDHERE";
  urlParameters +=  "&uuid=" + Uuid;

  // Send POST request
  .
  .
  .
  return response.toString();
}

Oracle ATG Web Commerce

Overview

Janrain’s eCommerce Extension for ATG provides a module that enables the integration of the Janrain Customer Profile Management platform for ATG storefronts. The module is compatible with Janrain Social Login, Registration, Single Sign-on, and Social Sharing.

This integration enables retailers to add social login and sharing to their native ATG registration workflow or replace it with Janrain’s customizable, hosted Registration solution while rich social profile data is stored in the cloud and synchronized to your ATG customer database.

Version 1.1 of the Janrain Oracle ATG integration is compatible with Oracle ATG version 10.0.x.

Prerequisites

  • A Janrain Social Login account is required when using the Oracle ATG Web Commerce integration for Social Login.
  • A Janrain Registration account is required when using the Oracle ATG Web Commerce integration for Social Login and Registration.

Installation

A guide to implementing the integration is available in PDF format.

Installation Overview

The following implementation steps are described in the installation guide:

  1. Implement ATG schema extensions.
  2. Janrain Social Login configuration.
  3. Janrain Registration configuration.
  4. (Optional) FGEmail module configuration.
  5. ATG Storefront module common configuration.
  6. ATG Storefront module common extensions.
Scroll ↓