IDM 7.3.1

Vkontakte social identity provider

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

When you configure a Vkontakte app, look for an Application ID and a Secure Key. IDM uses this information as a clientId and clientSecret, respectively.

Set up Vkontakte

  1. To set up Vkontakte as a social identity provider, navigate to the Vkontakte Developers Page. You’ll need a Vkontakte account.

  2. 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, refer to VK Developers Documentation, API Versions. The default VKontakte API version used for IDM 7.3 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.
  3. 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:

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

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

  3. In the Vkontakte Provider window, enter applicable values in the fields, and click Save. For a complete list of fields, refer to 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, 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.

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:

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

Application ID

clientId

The client identifier for your Vkontakte App

Secure Key

clientSecret

Used with the Client ID to access the applicable Vkontakte API

Scope

scope

An array of strings that allows access to user data.

Authorization Endpoint

authorizationEndpoint

Typically https://oauth.vk.com/authorize.

Token Endpoint

tokenEndpoint

Endpoint that receives a one-time authorization code, and returns an access token; typically https://oauth.vk.com/access_token

User Info Endpoint

userInfoEndpoint

Endpoint that transmits scope-related fields; typically https://api.vk.com/method/users.get

API Version

apiVersion

Version of the applicable VKontakte API, available from VK Developers Documentation, API Versions section. The default VKontakte API version used for IDM 7.3 is 5.73.

Not in the admin UI

provider

Name of the social identity provider

Not in the admin UI

configClass

Configuration class for the authentication module

Not in the admin UI

basicAuth

Whether to use basic authentication

Not in the admin UI

authenticationIdKey

The user identity property, such as id

Not in the admin UI

propertyMap

Mapping between Vkontakte and IDM

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