AddMinPinLengthExtension Method
AddMinPinLengthExtension(AuthenticatorInfo)
Specify that the YubiKey should return the minimum PIN length with the credential.
public void AddMinPinLengthExtension(AuthenticatorInfo authenticatorInfo)
Parameters
Type | Name | Description |
---|---|---|
AuthenticatorInfo | authenticatorInfo | The FIDO2 |
Remarks
Because this extension is used more often, a dedicated method is provided as a convenience. Note that the minimum PIN length is visible to only those RPs who have permission. See the documentation for TrySetPinConfig(Nullable<Int32>, IReadOnlyList<String>, Nullable<Boolean>) and the User's Manual entry on the minimum PIN length.
When the YubiKey makes the credential, it will be sent to the relying party. At that point, the relying party can reject it. One reason an RP might reject a credential is if the minimum PIN length is too short.
If the RP for which the credential is being built is not allowed to see the minimum PIN length, the YubiKey will simply not return the minimum PIN length. This is not an error. The credential will be made, but it will not contain the minimum PIN length.
If the minimum PIN length is returned with the credential, it will be in the AuthenticatorData and can be retrieved using GetMinPinLengthExtension()
The caller supplies the AuthenticatorInfo
for the YubiKey,
obtained by calling the GetInfoCommand or
providing the AuthenticatorInfo property.
This method will determine from the authenticatorInfo
whether
the YubiKey supports this extension.