다음을 통해 공유


IPC_CREDENTIAL structure

Credential structure used to authenticate to a server running AD RMS.

Syntax

typedef struct _IPC_CREDENTIAL {
  DWORD dwType;
  union {
    PCCERT_CONTEXT                 pcCertContext;
    PCIPC_CREDENTIAL_SYMMETRIC_KEY pcSymmetricKey;
    PIPC_OATH2_CALLBACK_INFO       pcOAuth2;
  };
} IPC_CREDENTIAL, *PIPC_CREDENTIAL;

Members

dwType

Contains the type code for the credential, which governs how the credential is interpreted. For more information, see Remarks.

IPC_CREDENTIAL_TYPE_X509 (1)

X509 Credential - only allowed when the API Mode is set to IPC_API_MODE_SERVER. For more information, see API mode values.

IPC_CREDENTIAL_TYPE_SYMMETRIC_KEY (2)

Symmetric Key - only allowed when the API Mode is set to IPC_API_MODE_SERVER. For more information, see API mode values.

IPC_CREDENTIAL_TYPE_OAUTH2 (3)

pcOauth2 is valid and points to an IPC_OAUTH2_CALLBACK_INFO structure that will be exercised to retrieve an OAuth token when authentication is required.

pcCertContext

Credential governed by dwType.

pcSymmetricKey

Symmetric key credential represented by an IPC_CREDENTIAL_SYMMETRIC_KEY structure.

pcOAuth2

Callback for an OAuth credential represented by an IPC_OAUTH2_CALLBACK_INFO structure.

Remarks

[!Important]
The union in this structure has been updated to work with compilers that do not support nameless unions. If your compiler does not support nameless unions, define the NONAMELESSUNION token before including the Msipc.h header file.

The value of the dwType member governs the interpretation of the union. The following list shows the possible values for dwType.

IPC_CREDENTIAL_TYPE_X509/PCCERT_CONTEXT

Use one of the Cryptographic APIs defined in WinCrypt.h to create PCCERT_CONTEXT (for example, CertFindCertificateInStore or CertCreateCertificateContext).

The PCCERT_CONTEXT value should be valid until the call is returned.

This credential will be used while connecting to an AD RMS server to authenticate. If the specified credential fails to authenticate HRESULT_FROM_WIN32(ERROR_NOT_AUTHENTICATED) will be returned. This credential will be used silently (that is, no credentials UI will be displayed).

IPC_CREDENTIAL_TYPE_SYMMETRIC_KEY/PCIPC_CREDENTIAL_SYMMETRIC_KEY

The Symmetric key, Service Principal Name and BPOS Id can be acquired by registering the Service Principal in ACS. For more information, see Enable your service application to work with cloud based RMS.

IPC_CREDENTIAL_TYPE_OATH2/PIPC_OATH2_CALLBACK_INFO

The RMS SDK will exercise this callback when OAuth authentication is needed.

For more information on how to retrieve a token, see Azure Active Directory Authentication Libraries.

Requirements

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

See also

API mode values

IPC_CREDENTIAL_SYMMETRIC_KEY

IPC_OAUTH2_CALLBACK_INFO

CertCreateCertificateContext

CertFindCertificateInStore

ADAL authentication for your RMS enabled application

Azure Active Directory Authentication Libraries

Enable your service application to work with cloud based RMS