Twitter 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 Twitter
For additional information, refer to Single-user OAuth with Examples.
-
To set up Twitter as a social identity provider, you’ll need a Twitter account, and then navigate to Twitter Application Management.
-
Select Create New App, and enter at least the following information:
-
Name
-
Description
-
Website, such as
http://openidm.example.com:8080
-
Callback URL, such as
http://openidm.example.com:8080/
; required for IDM; for other providers, known asRedirectURI
-
-
Click Save.
The page displays a
Consumer Key
andConsumer Secret
for your new web app.
Twitter Apps use the OAuth 1.0a protocol. With IDM, you can use the same process used to configure OIDC and OAuth 2 social identity providers. |
Configure Twitter as a social identity provider
To configure a Twitter social identity provider using the admin UI:
-
From the navigation bar, click Configure > Social ID Providers.
-
On the Social Identity Providers page, enable Twitter.
-
In the Twitter Provider window, enter applicable values in the fields, and click Save. For a complete list of fields, refer to Twitter Social Identity Provider Configuration Details.
After you save the social identity provider configuration, IDM generates a conf/identityProvider-twitter.json
file:
{
"provider" : "twitter",
"requestTokenEndpoint" : "https://api.twitter.com/oauth/request_token",
"authorizationEndpoint" : "https://api.twitter.com/oauth/authenticate",
"tokenEndpoint" : "https://api.twitter.com/oauth/access_token",
"userInfoEndpoint" : "https://api.twitter.com/1.1/account/verify_credentials.json",
"clientId" : "<Client_ID_Name>",
"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>"
}
}
},
The next part of 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 Twitter social identity, you can verify this by selecting Manage > Twitter, 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: Twitter Social Identity Provider Configuration Details.
Configure user registration to link to Twitter
Once you’ve configured the Twitter 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.
Twitter social identity provider configuration details
You can set up the Twitter social identity provider through the admin UI or in a conf/identityProvider-twitter.json
file. IDM generates the identityProvider-twitter.json
file when you configure and enable the Twitter social identity provider in the admin UI. Alternatively, you can create that file manually.
The following table includes the information shown in the admin UI Twitter Provider pop-up window, along with associated information in the identityProvider-twitter.json
file.
Property (UI) | Property (JSON file) | Description |
---|---|---|
Consumer Key |
|
The client identifier for your Twitter App |
Consumer Secret |
|
Used with the Client ID to access the applicable Twitter API |
Authorization Endpoint |
|
Typically |
Access Token Endpoint |
|
Endpoint that receives a one-time authorization code, and returns an access token; typically |
User Info Endpoint |
|
Access for other URIs; typically |
Request Token Endpoint |
|
Endpoint that receives a one-time authorization code, and returns an access token; typically |
Not in the admin UI |
|
Name of the social identity provider |
Not in the admin UI |
|
The user identity property, such as |
Not in the admin UI |
|
Configuration class for the authentication module |
Not in the admin UI |
|
Whether to use basic authentication |
Not in the admin UI |
|
Mapping between Twitter and IDM |
For information on social identity provider buttons and badges, refer to Social identity provider button and badge properties.