Setting Up Vkontakte as an IDM Social Identity Provider

As suggested in the introduction to this chapter, you'll need to take the following basic steps to configure Vkontakte as a social identity provider for IDM:


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.

Setting Up Vkontakte

To set up Vkontakte as a social identity provider, navigate to the following Vkontakte page: Vkontakte Developers Page . You'll need a Vkontakte account. Find a My Apps link. You can then 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

  • Base domain (Example:

  • Authorized Redirect URI (Example:

  • API Version; for the current VKontakte API version, see VK Developers Documentation, API Versions section. The default VKontakte API version used for IDM 7 is 5.73.

If you leave and need to return to Vkontakte, navigate to 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 for your app. You'll use that information as shown here:

  • Vkontakte Application ID = IDM Client ID

  • Vkontakte Secure Key = IDM Client Secret

Configuring a Vkontakte Social Identity Provider

  1. To configure a Vkontakte social identity provider, log in to the Admin UI and navigate to Configure > Social ID Providers.

  2. Enable the Vkontakte social identity provider.

    In the Vkontakte Provider pop-up that appears, the values for Redirect URI should match the values that you've entered for Authorized Redirect URI in "Setting Up Vkontakte".

  3. Include the values that Vkontakte created for Client ID and Client Secret, as described in "Setting Up Vkontakte".

  4. Under regular and Advanced Options, include the options shown in the following appendix: "Vkontakte Social Identity Provider Configuration Details".

When you enable a Vkontakte social identity provider in the Admin UI, IDM generates the identityProvider-vkontakte.json file in your project's conf/ subdirectory.

When you review that file, you should see information beyond what you see in the Admin UI. The first part of the file includes the name of the provider, endpoints, as well as information from the Consumer Key and Consumer Secret, you'll see them as clientId and clientSecret, respectively, in the configuration 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" : "",
    "tokenEndpoint" : "",
    "userInfoEndpoint" : "",
    "redirectUri" : "",
    "apiVersion" : "5.73",
    "scope" : [

You should also see UI settings related to the social identity provider icon (badge) and the sign-in button, described in "Social Identity Provider Button and Badge Properties".

You'll see links related to the authenticationIdKey, redirectUri, and configClass; the location may vary.

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".

Configuring 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.

Read a different version of :