IDM 7.3.0

WordPress social identity provider

Social authentication is deprecated and will be removed in a future release of IDM. For more information, refer to Deprecation.

Set up WordPress

To set up WordPress as a social identity provider, navigate to Developer Resources. You’ll need a WordPress account. You can then navigate to the WordPress My Applications page, where you can create a new web application, with the following information:

  • Name

  • Description

  • Website URL, which becomes your Application URL

  • Redirect URL(s); for IDM, normally http://openidm.example.com:8080/

  • Type, which allows you to select Web clients

When complete and saved, you should see a list of OAuth Information for your new web application. That information should include your Client ID and Client Secret.

Configure a WordPress social identity provider

To configure a WordPress social identity provider using the admin UI:

  1. From the navigation bar, click Configure > Social ID Providers.

  2. On the Social Identity Providers page, enable WordPress.

  3. In the WordPress Provider window, enter applicable values in the fields, and click Save. For a complete list of fields, refer to WordPress Social Identity Provider Configuration Details.

After you save the social identity provider configuration, IDM generates a conf/identityProvider-wordpress.json file:

{
    "provider" : "wordpress",
    "authorizationEndpoint" : "https://public-api.wordpress.com/oauth2/authorize",
    "tokenEndpoint" : "https://public-api.wordpress.com/oauth2/token",
    "userInfoEndpoint" : "https://public-api.wordpress.com/rest/v1.1/me/",
    "enabled" : true,
    "clientId" : "<someUUID>",
    "clientSecret" : {
       "$crypto" : {
           "type" : "x-simple-encryption",
           "value" : {
               "cipher" : "AES/CBC/PKCS5Padding",
               "stableId" : "openidm-sym-default",
               "salt" : "<hashValue>",
               "data" : "<encryptedValue>",
               "keySize" : 16,
               "purpose" : "idm.config.encryption",
               "iv" : "<encryptedValue>",
               "mac" : "<hashValue>"
           }
       }
    },
    "scope" : [
        "auth"
    ],
...

The file includes schema information, which includes properties for each social identity account, as collected by IDM, as well as the order in which it appears in the admin UI. When you’ve registered a user with a Wordpress social identity, you can verify this by selecting Manage > Wordpress, and then selecting a user.

Another part of the file includes a propertyMap, which maps user information entries between the source (social identity provider) and the target (IDM).

If you need more information about the properties in this file, refer to the following appendix: WordPress Social Identity Provider Configuration Details.

Configure user registration to link to WordPress

Once you’ve configured the WordPress social identity provider, you can activate it through User Registration. To do so in the admin UI, select Configure > User Registration, and activate that feature. Under the Social tab that appears, enable Social Registration. For more information on IDM user self-service features, refer to Self-Service End User UI.

When you enable Social Registration, you’re allowing users to register on IDM through all active social identity providers.

WordPress social identity provider configuration details

You can set up the WordPress social identity provider through the admin UI or in a conf/identityProvider-wordpress.json file. IDM generates the identityProvider-wordpress.json file when you configure and enable this social identity provider in the admin UI. Alternatively, you can create the file manually.

The following table includes the information shown in the admin UI WordPress Provider pop-up window, along with associated information in the identityProvider-wordpress.json file:

WordPress social identity provider configuration properties
Property (UI) Property (JSON file) Description

Client ID

clientId

The client identifier for your WordPress App

Client Secret

clientSecret

Used with the Client ID to access the applicable WordPress API

Scope

scope

An array of strings that allows access to user data; refer to WordPress’s OAuth2 Authentication Documentation.

Authorization Endpoint

authorizationEndpoint

Typically https://public-api.wordpress.com/oauth2/authorize; known as a WordPress Authorize URL.

Token Endpoint

tokenEndpoint

Endpoint that receives a one-time authorization code, and returns an access token; typically https://public-api.wordpress.com/oauth2/token; known as a WordPress Request Token URL.

User Info Endpoint

userInfoEndpoint

Endpoint that transmits scope-related fields; typically https://public-api.wordpress.com/rest/v1.1/me/

Not in the admin UI

name

Name of the social identity provider

Not in the admin UI

type

Authentication module

Not in the admin UI

authenticationId

Authentication identifier, as returned from the User Info Endpoint for each social identity provider

Not in the admin UI

propertyMap

Mapping between WordPress and IDM

For information on social identity provider buttons and badges, refer to Social identity provider button and badge properties.

Copyright © 2010-2023 ForgeRock, all rights reserved.