Vkontakte social identity provider
Social authentication is deprecated and will be removed in a future release of IDM. For more information, see Deprecation. |
When you configure a Vkontakte app, look for an Application ID and a Secure Key. IDM uses this information as a |
Set up Vkontakte
-
To set up Vkontakte as a social identity provider, navigate to the Vkontakte Developers Page. You’ll need a Vkontakte account.
-
Click My Apps, and create an application with the following information:
-
Title (The name of your app)
-
Platform (Choose Website)
-
Site Address (The URL of your IDM deployment, such as
http://openidm.example.com:8080/
-
Base domain (Example:
example.com
) -
Authorized Redirect URI (Example:
http://openidm.example.com:8080/
) -
API Version; for the current VKontakte API version, see VK Developers Documentation, API Versions. The default VKontakte API version used for IDM 7.2.1 is 5.73.
If you leave and need to return to Vkontakte, navigate to https://vk.com/dev
and select My Apps. You can then Manage the new apps that you’ve created. -
-
Navigate to the Settings for your app, where you’ll find the Application ID and Secure Key. You’ll use that information as shown here:
-
Vkontakte Application ID = IDM Client ID
-
Vkontakte Secure Key = IDM Client Secret
-
Configure a Vkontakte social identity provider
To configure a Vkontakte social identity provider using the admin UI:
-
From the navigation bar, click Configure > Social ID Providers.
-
On the Social Identity Providers page, enable Vkontakte.
-
In the Vkontakte Provider window, enter applicable values in the fields, and click Save. For a complete list of fields, see Vkontakte Social Identity Provider Configuration Details.
After you save the social identity provider configuration, IDM generates a conf/identityProvider-vkontakte.json
file:
{
"provider" : "vkontakte",
"configClass" : "org.forgerock.oauth.clients.vk.VKClientConfiguration",
"basicAuth" : false,
"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>"
}
}
},
"authorizationEndpoint" : "https://oauth.vk.com/authorize",
"tokenEndpoint" : "https://oauth.vk.com/access_token",
"userInfoEndpoint" : "https://api.vk.com/method/users.get",
"redirectUri" : "http://openidm.example.com:8080/",
"apiVersion" : "5.73",
"scope" : [
"email"
],
...
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 Vkontakte social identity, you can verify this by selecting Manage > Vkontakte, 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: Vkontakte Social Identity Provider Configuration Details.
Configure user registration to link to Vkontakte
Once you’ve configured the Vkontakte 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, see Self-service end user UI.
When you enable Social Registration, you’re allowing users to register on IDM through all active social identity providers.
Vkontakte social identity provider configuration details
You can set up the Vkontakte social identity provider through the admin UI or in a conf/identityProvider-vkontakte.json
file. IDM generates the identityProvider-vkontakte.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 Vkontakte Provider pop-up window, along with associated information in the identityProvider-vkontakte.json
file:
Property (UI) | Property (JSON file) | Description |
---|---|---|
Application ID |
|
The client identifier for your Vkontakte App |
Secure Key |
|
Used with the Client ID to access the applicable Vkontakte API |
Scope |
|
An array of strings that allows access to user data. |
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 |
API Version |
|
Version of the applicable VKontakte API, available from VK Developers Documentation, API Versions section. The default VKontakte API version used for IDM 7.2.1 is 5.73. |
Not in the admin UI |
|
Name of the social identity provider |
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 |
|
The user identity property, such as |
Not in the admin UI |
|
Mapping between Vkontakte and IDM |
For information on social identity provider buttons and badges, see Social identity provider button and badge properties.