Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
WebAuthNAuthenticatorMakeCredential function (webauthn.h)
Creates a public key credential source bound to a managing authenticator and returns the credential public key associated with its credential private key. The Relying Party can use this credential public key to verify the authentication assertions created by this public key credential source.
Syntax
HRESULT WebAuthNAuthenticatorMakeCredential(
HWND hWnd,
PCWEBAUTHN_RP_ENTITY_INFORMATION pRpInformation,
PCWEBAUTHN_USER_ENTITY_INFORMATION pUserInformation,
PCWEBAUTHN_COSE_CREDENTIAL_PARAMETERS pPubKeyCredParams,
PCWEBAUTHN_CLIENT_DATA pWebAuthNClientData,
PCWEBAUTHN_AUTHENTICATOR_MAKE_CREDENTIAL_OPTIONS pWebAuthNMakeCredentialOptions,
PWEBAUTHN_CREDENTIAL_ATTESTATION *ppWebAuthNCredentialAttestation
);
Parameters
hWnd
The handle of the window used to display the WebAuthn UI to the user.
pRpInformation
A pointer to a WEBAUTHN_RP_ENTITY_INFORMATION structure that identifies the Relying Party on whose behalf the credential is created.
pUserInformation
A pointer to a WEBAUTHN_USER_ENTITY_INFORMATION structure that contains the user account information, including the user handle specified by the Relying Party.
pPubKeyCredParams
A pointer to a WEBAUTHN_COSE_CREDENTIAL_PARAMETERS structure that contains the Relying Party's ordered list of preferred public key credential types and algorithms. The authenticator makes a best-effort to create the most preferred credential that it can.
pWebAuthNClientData
A pointer to a WEBAUTHN_CLIENT_DATA structure that contains the client data hash to be sent to the authenticator.
pWebAuthNMakeCredentialOptions
An optional pointer to a WEBAUTHN_AUTHENTICATOR_MAKE_CREDENTIAL_OPTIONS structure that specifies additional options for credential creation, such as exclude lists and authenticator selection criteria. This parameter can be NULL.
ppWebAuthNCredentialAttestation
When this function returns successfully, contains a pointer to a WEBAUTHN_CREDENTIAL_ATTESTATION structure that holds the attestation object returned by the authenticator. Free this with WebAuthNFreeCredentialAttestation.
Return value
If the function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code. Call WebAuthNGetErrorName to get a human-readable error string. Call WebAuthNGetW3CExceptionDOMError to map the result to a W3C DOM exception code.
Remarks
This function implements the authenticatorMakeCredential operation defined in the W3C Web Authentication specification. The caller is typically a client application acting on behalf of a Relying Party.
The operation is modal and displays system UI through the window specified by hWnd. The caller can cancel a pending operation by calling WebAuthNCancelCurrentOperation.
Requirements
| Requirement | Value |
|---|---|
| Header | webauthn.h |
| Library | OneCoreUAP.Lib |
See also
Feedback
Was this page helpful?
