Share via


IPC_OAUTH2_CALLBACK callback function

A pointer to a function that is called when the RMS client requests an OAuth authentication token.

Syntax

HRESULT  CALLBACK IPC_OAUTH2_CALLBACK(
  _In_  LPVOID                pvContext,
  _In_  PIPC_NAME_VALUE_LIST  pOAuth2ChallengeInfo,
  _Out_ IPC_AUTH_TOKEN_HANDLE *phAccessToken
);

Parameters

pvContext [in]

Pointer to an application-defined structure that is assigned as part of IPC_OAUTH2_CALLBACK_INFO.

pOAuth2ChallengeInfo [in]

Pointer to a list of OAuth settings provided by the IRM server.

For the Azure Active Directory Security Token Service (STS), these settings are:

authorization (URL for the STS authorization provider)

resource (Service principal name for this Azure Rights Management Service)

realm (Identifier for the tenant that is requesting the authentication token)

phAccessToken [out]

Pointer to a pointer that will hold the address of an IPC_AUTH_TOKEN_HANDLE.

Use IpcCreateOAuth2Token to allocate this handle before returning successfully from the function pointed to by IPC_OAUTH2_CALLBACK.

Do not release this allocation after returning from the IPC_OAUTH2_CALLBACK function. The RMS SDK will manage the allocation release.

Return value

The return value of a callback is managed by the system.

Requirements

Minimum supported client
Windows Vista with SP2
Minimum supported server
Windows Server 2008
Header
Ipcbase.h (include Msipc.h)

See also

IPC_NAME_VALUE_LIST

IPC_OAUTH2_CALLBACK_INFO

IpcCreateOAuth2Token

Data types