Class CredentialUserInfo
Contains the info about a user in one credential on the YubiKey. This is the class returned when calling EnumerateCredentialsForRelyingParty(RelyingParty).
public class CredentialUserInfo
- Inheritance
-
objectCredentialUserInfo
Constructors
CredentialUserInfo(UserEntity, CredentialId, CoseKey, int, ReadOnlyMemory<byte>?, bool?)
Build a new instance of CredentialUserInfo based on the given objects related to a user.
public CredentialUserInfo(UserEntity user, CredentialId credentialId, CoseKey credentialPublicKey, int credProtectPolicy, ReadOnlyMemory<byte>? largeBlobKey = null, bool? thirdPartyPayment = null)
Parameters
userUserEntityThe user associated with the credential.
credentialIdCredentialIdThe credential ID, which includes the Id and Type.
credentialPublicKeyCoseKeyThe public key to use when verifying a credential.
credProtectPolicyintAn int specifying the credential protection policy.
largeBlobKeyReadOnlyMemory<byte>?If null, there is no large blob key. If not null, this is the key that can be used to encrypt or decrypt large blob data for the credential.
thirdPartyPaymentbool?Whether the credential was created as payment-enabled. If null, the authenticator did not return the thirdPartyPayment element.
Properties
CredProtectPolicy
The credential protection policy. See section 12.1.1 of the FIDO2 standard for a description of the meanings of the number returned.
public CredProtectPolicy CredProtectPolicy { get; }
Property Value
CredentialId
The credential ID for a credential returned.
public CredentialId CredentialId { get; }
Property Value
CredentialPublicKey
The public key for a credential returned.
public CoseKey CredentialPublicKey { get; }
Property Value
LargeBlobKey
The large blob key for a credential. If this property is null, either the credential does not have a large blob key, or it does have a large blob key but it is not requested.
public ReadOnlyMemory<byte>? LargeBlobKey { get; }
Property Value
- ReadOnlyMemory<byte>?
ThirdPartyPayment
Whether this credential is third-party payment enabled. Null if the credential was not created with the thirdPartyPayment extension.
public bool? ThirdPartyPayment { get; }
Property Value
- bool?
User
The user entity for a credential returned.
public UserEntity User { get; }
Property Value
Methods
TryGetCredentialManagementField(int, out ReadOnlyMemory<byte>)
Gets the raw CBOR-encoded value for a field in the credential management response that produced this instance.
public bool TryGetCredentialManagementField(int key, out ReadOnlyMemory<byte> encodedValue)
Parameters
keyintThe integer CTAP map key to read.
encodedValueReadOnlyMemory<byte>The raw CBOR-encoded value for
key, if present.
Returns
Remarks
This method provides access to credential-specific fields in the credential-management response that do not yet have a dedicated SDK property. The returned value is the raw CBOR encoding of the field value, not a decoded .NET object. It returns false for instances that were not built from a credential-management response returned by the SDK.