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:
-
From the navigation bar, click Configure > Social ID Providers.
-
On the Social Identity Providers page, enable WordPress.
-
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:
Property (UI) | Property (JSON file) | Description |
---|---|---|
Client ID |
|
The client identifier for your WordPress App |
Client Secret |
|
Used with the Client ID to access the applicable WordPress API |
Scope |
|
An array of strings that allows access to user data; refer to WordPress’s OAuth2 Authentication Documentation. |
Authorization Endpoint |
|
Typically |
Token Endpoint |
|
Endpoint that receives a one-time authorization code, and returns an access token; typically |
User Info Endpoint |
|
Endpoint that transmits scope-related fields; typically |
Not in the admin UI |
|
Name of the social identity provider |
Not in the admin UI |
|
Authentication module |
Not in the admin UI |
|
Authentication identifier, as returned from the User Info Endpoint for each social identity provider |
Not in the admin UI |
|
Mapping between WordPress and IDM |
For information on social identity provider buttons and badges, refer to Social identity provider button and badge properties.