Show / Hide Table of Contents

UserEntity Class

Namespace: Yubico.YubiKey.Fido2 Assembly: Yubico.YubiKey.dll

A FIDO2 UserEntity, consisting of ID, display name, and name. This is used when the FIDO2 standard specifies a PublicKeyCredentialUserEntity.

C#
public class UserEntity
Inheritance object UserEntity

Remarks

A relying party (RP) will specify the user ID (which might or might not be human-readable), which can be an account number. Either the platform or the RP can specify a display name, the name of the account holder, and a name, which is an account name (different accounts might have the same display name). The display name and name are human-readable and can be displayed to the user.

This class holds the RP ID, display name, and name, and can encode and decode them as part of CBOR structures.

The FIDO2 standard specifies that when communicating with the authenticator, the ID is not a required element, although it will likely lead to interoperability issues if no value is given. This class will require an ID.

The W3C standard declares the display name and name required elements, but the FIDO2 standard declares them optional. Because the FIDO2 standard specifically prescribes authenticator functionality, this class will allow null display name and name.

Constructors

Name Description
UserEntity(ReadOnlyMemory<byte>)

Constructs a new instance of UserEntity.

UserEntity(ReadOnlyMemory<byte>, out int)

Constructs a new instance of UserEntity from the encodedUserEntity.

Properties

Name Description
DisplayName

The displayName component of the UserEntity.

Id

The id component of the UserEntity.

Name

The name component of the UserEntity.

Methods

Name Description
CborEncode()

Return a new byte array that is the object encoded following the FIDO2/CBOR standard.

In this article
Back to top Generated by DocFX