MakeCredentialParameters Constructor
MakeCredentialParameters(RelyingParty, UserEntity, String, CoseAlgorithmIdentifier)
Constructs a new instance of MakeCredentialParameters setting the preferred algorithm to something other than the default.
public MakeCredentialParameters(RelyingParty relyingParty, UserEntity userEntity, string algorithmType, CoseAlgorithmIdentifier algorithm)
Parameters
Type | Name | Description |
---|---|---|
RelyingParty | relyingParty | The relying party for which the credential is to be created. This constructor copies a reference to the input object. |
UserEntity | userEntity | The user for which the credential is to be created. This constructor copies a reference to the input object. |
System.String | algorithmType | The type of type and algorithm that is the caller's preferred choice. |
CoseAlgorithmIdentifier | algorithm | The algorithm of type and algorithm that is the caller's preferred choice. |
Remarks
Note that a UserEntity
is a required element in order to make
a credential. The standard specifies that the UserEntity
is
made up of an ID
, a Name
, and a DisplayName
.
The standard also says the Name
and DisplayName
are
optional. It should be possible to make a credential using a
UserEntity
that contains only an ID
. However, YubiKeys
prior to version 5.3.0 require a Name
in order to make a
credential.
One of the required elements of the MakeCredential
parameters
is a list of supported algorithms (a type and algorithm pair,
Algorithms). Hence, you must supply at least one
algorithm, which will be the preferred one. Currently the only
algorithm supported by the YubiKey is the pair
"public-key"/ECDSA with SHA-256
. To build this parameters
object with that credential type, use the constructor that adds it be
default. If you want to specify something other than the default, use
this constructor.
It is possible to add more types later using the method AddAlgorithm(String, CoseAlgorithmIdentifier).
MakeCredentialParameters(RelyingParty, UserEntity)
Constructs a new instance of MakeCredentialParameters using the default preferred algorithm
public MakeCredentialParameters(RelyingParty relyingParty, UserEntity userEntity)
Parameters
Type | Name | Description |
---|---|---|
RelyingParty | relyingParty | The relying party for which the credential is to be created. This constructor copies a reference to the input object. |
UserEntity | userEntity | The user for which the credential is to be created. This constructor copies a reference to the input object. |
Remarks
Note that a UserEntity
is a required element in order to make
a credential. The standard specifies that the UserEntity
is
made up of an ID
, a Name
, and a DisplayName
.
The standard also says the Name
and DisplayName
are
optional. It should be possible to make a credential using a
UserEntity
that contains only an ID
. However, YubiKeys
prior to version 5.3.0 require a Name
in order to make a
credential.
One of the required elements of the MakeCredential
parameters
is a list of supported algorithms (a type and algorithm pair,
Algorithms). Hence, you must supply at least one
algorithm, which will be the preferred one. Currently the only
algorithm supported by the YubiKey is the pair
"public-key"/ECDSA with SHA-256
. To build this parameters
object with that credential type, use this constructor, which will
add it by default. If you want to specify something other than the
default, use the constructor that takes in an algorithmType
and algorithm
.
It is possible to add more types later using the method AddAlgorithm(String, CoseAlgorithmIdentifier).