External.authenticate method

[The feature associated with this page, Windows Media Player SDK, is a legacy feature. It has been superseded by MediaPlayer. MediaPlayer has been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer instead of Windows Media Player SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The authenticate method initiates an attempt to authenticate the user.

Syntax

External.authenticate(
  AuthenticationIndex
)

Parameters

AuthenticationIndex [in]

Number (long) that specifies the index of an authentication-success webpage.

Return value

This method does not return a value.

Remarks

Certain links on a discovery page have targets that should be displayed only after the user has been authenticated. The discovery page, Windows Media Player, and the online store's plug-in use the following steps to authenticate the user and display the target webpage:

  1. Script on a discovery page calls the External.authenticate method.
  2. Windows Media Player displays a dialog box to obtain a user name and password.
  3. Windows Media Player calls IWMPContentPartner::Authenticate, which initiates the authentication attempt and returns immediately.
  4. When the authentication attempt is complete, the online store's plug-in calls IWMPContentPartnerCallback::Notify, passing wmpcnAuthResult and a Boolean value that indicates whether the attempt was successful.
  5. If the authentication attempt was successful, Windows Media Player calls IWMPContentPartner::GetItemInfo, passing g_szItemInfo_AuthenticationSuccessURL, to obtain the URL of an authentication-success webpage. In this call, Windows Media Player passes the same index that the discovery page passed to the External.authenticate method.
  6. Windows Media Player displays the authentication-success webpage.

Requirements

Requirement Value
Version
Windows Media Player 11
DLL
Wmp.dll

See also

External Object for Type 1 Online Stores

External.attemptLogin

External.userLoggedIn