Sdílet prostřednictvím


IpcCreateOAuth2Token function

Returns a handle to an authentication token object that is created from an authentication token string.

Syntax

HRESULT WINAPI IpcCreateOAuth2Token(
  _In_  LPCWSTR                wszAuthToken,
  _Out_ PIPC_AUTH_TOKEN_HANDLE phIpcAuthToken
);

Parameters

wszAuthToken [in]

A string representing an authentication token provided by a Security Token Service. The string should be in the form of a JSON Web Token (JWT).

phIpcAuthToken [out]

A pointer to a variable that receives a handle to the authentication token object.

Note

This key handle should only be closed with IpcCloseHandle when IPC_OAUTH2_CALLBACK does not return successfully.

Return value

If the function succeeds, the return value is S_OK. If the function fails, it returns an HRESULT value that indicates the error.

For more information, see Error codes for a description of all RMS SDK 2.1 return values.

Remarks

When calling IpcCreateOAuth2Token from inside your IPC_OAUTH2_CALLBACK function, you should not release the handle to phIpcAuthToken unless you will be returning an error code from your IPC_OAUTH2_CALLBACK function. The RMS Client will manage the allocation release when your IPC_OAUTH2_CALLBACK function returns successfully.

Requirements

Minimum supported client
Windows Vista with SP2
Minimum supported server
Windows Server 2008
Header
Ipcprot.h (include Msipc.h)
Library
Msipc.lib
DLL
Msipc.dll

See also

IPC_CREDENTIAL

IPC_OAUTH2_CALLBACK

IpcGetTemplateList

IpcGetTemplateIssuerList

IpcGetKey

Error codes